Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hidra
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steinbac
hidra
Commits
651d64c1
Commit
651d64c1
authored
9 years ago
by
Manuela Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
Notify worker if FileMover exits
parent
42176580
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sender/FileMover.py
+1
-0
1 addition, 0 deletions
src/sender/FileMover.py
src/sender/WorkerProcess.py
+5
-11
5 additions, 11 deletions
src/sender/WorkerProcess.py
with
6 additions
and
11 deletions
src/sender/FileMover.py
+
1
−
0
View file @
651d64c1
...
...
@@ -344,6 +344,7 @@ class FileMover():
self
.
log
.
debug
(
"
Closing sockets
"
)
self
.
fileEventSocket
.
close
(
0
)
self
.
receiverComSocket
.
close
(
0
)
self
.
sendSignalToWorker
(
"
EXIT
"
)
self
.
routerSocket
.
close
(
0
)
This diff is collapsed.
Click to expand it.
src/sender/WorkerProcess.py
+
5
−
11
View file @
651d64c1
...
...
@@ -152,10 +152,7 @@ class WorkerProcess():
will be removed.
"""
processingJobs
=
True
jobCount
=
0
while
processingJobs
:
while
True
:
#sending a "ready"-signal to the router.
#the reply will contain the actual job/task.
self
.
log
.
debug
(
"
worker-
"
+
str
(
self
.
id
)
+
"
: sending ready signal
"
)
...
...
@@ -164,16 +161,14 @@ class WorkerProcess():
# Get workload from router, until finished
self
.
log
.
debug
(
"
worker-
"
+
str
(
self
.
id
)
+
"
: waiting for new job
"
)
self
.
log
.
debug
(
"
worker-
"
+
str
(
self
.
id
)
+
"
: waiting for new job
"
)
workload
=
self
.
routerSocket
.
recv
()
self
.
log
.
debug
(
"
worker-
"
+
str
(
self
.
id
)
+
"
: new job received
"
)
self
.
log
.
debug
(
"
worker-
"
+
str
(
self
.
id
)
+
"
: new job received
"
)
finished
=
workload
==
b
"
E
ND
"
finished
=
workload
==
b
"
E
XIT
"
if
finished
:
processingJobs
=
False
self
.
log
.
debug
(
"
router requested to shutdown worker-process. Worker processed: %d files
"
%
jobCount
)
self
.
log
.
debug
(
"
Router requested to shutdown worker-
"
+
str
(
self
.
id
)
+
"
.
"
)
break
jobCount
+=
1
# after the signal processing
...
...
@@ -181,7 +176,6 @@ class WorkerProcess():
continue
# get metadata of the file
if
self
.
useDataStream
or
self
.
openConnections
[
"
streams
"
]
or
self
.
openConnections
[
"
queryNext
"
]
or
self
.
openConnections
[
"
OnDA
"
]:
try
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment