Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resif-integration-chain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSUG
RESIF
resif-integration-chain
Merge requests
!8
add connection timeout
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add connection timeout
signalhandler
into
master
Overview
0
Commits
1
Changes
1
Merged
Jerome Touvier
requested to merge
signalhandler
into
master
4 years ago
Overview
0
Commits
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
73001d73
1 commit,
4 years ago
1 file
+
7
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
integrationWorker.py
+
7
−
4
Options
@@ -298,15 +298,18 @@ if __name__ == "__main__":
signal
.
signal
(
signal
.
SIGHUP
,
stop_integration_worker
)
try
:
while
not
STOP_GLOBAL_LOOP
:
connection
=
BlockingConnection
(
AMQP_SERVER
)
while
True
:
connection
=
BlockingConnection
(
AMQP_SERVER
,
timeout
=
5
)
receiver
=
connection
.
create_receiver
(
QUEUE
)
message
=
receiver
.
receive
(
timeout
=
30
)
message
=
receiver
.
receive
()
receiver
.
accept
()
transaction_process
(
message
)
connection
.
close
()
except
(
KeyboardInterrupt
,
Timeout
)
:
except
KeyboardInterrupt
:
pass
except
(
Timeout
):
print
(
"
Connection or reception timeout
"
)
logging
.
info
(
"
Connection or reception timeout
"
)
logging
.
critical
(
"
integration worker quitting
"
)
sys
.
exit
(
1
)
Loading