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
aff3a4c0
Commit
aff3a4c0
authored
8 years ago
by
Manuela Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
New context is created in initiate
parent
1423c95b
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
APIs/dataTransferAPI.py
+8
-5
8 additions, 5 deletions
APIs/dataTransferAPI.py
src/sender/SignalHandler.py
+3
-1
3 additions, 1 deletion
src/sender/SignalHandler.py
with
11 additions
and
6 deletions
APIs/dataTransferAPI.py
+
8
−
5
View file @
aff3a4c0
...
...
@@ -40,9 +40,6 @@ class dataTransfer():
if
context
:
self
.
context
=
context
self
.
externalContext
=
True
else
:
self
.
context
=
zmq
.
Context
()
self
.
externalContext
=
False
self
.
signalHost
=
signalHost
...
...
@@ -79,6 +76,9 @@ class dataTransfer():
self
.
stop
()
raise
Excepition
(
"
Argument
'
targets
'
must be list.
"
)
if
not
self
.
context
:
self
.
context
=
zmq
.
Context
()
self
.
externalContext
=
False
signal
=
None
# Signal exchange
...
...
@@ -269,7 +269,7 @@ class dataTransfer():
connectionStr
=
"
tcp://
"
+
socketIdToConnect
try
:
self
.
dataSocket
.
bind
(
connectionStr
)
self
.
log
.
info
(
"
S
ocket of type
"
+
self
.
connectionType
+
"
started (bind) for
'"
+
connectionStr
+
"'"
)
self
.
log
.
info
(
"
Data s
ocket of type
"
+
self
.
connectionType
+
"
started (bind) for
'"
+
connectionStr
+
"'"
)
except
:
self
.
log
.
error
(
"
Failed to start Socket of type
"
+
self
.
connectionType
+
"
(bind):
'"
+
connectionStr
+
"'"
,
exc_info
=
True
)
...
...
@@ -282,7 +282,7 @@ class dataTransfer():
connectionStr
=
"
tcp://
"
+
self
.
signalHost
+
"
:
"
+
self
.
requestPort
try
:
self
.
requestSocket
.
connect
(
connectionStr
)
self
.
log
.
info
(
"
S
ocket started (connect) for
'"
+
connectionStr
+
"'"
)
self
.
log
.
info
(
"
Request s
ocket started (connect) for
'"
+
connectionStr
+
"'"
)
except
:
self
.
log
.
error
(
"
Failed to start Socket of type
"
+
self
.
connectionType
+
"
(connect):
'"
+
connectionStr
+
"'"
,
exc_info
=
True
)
...
...
@@ -519,6 +519,9 @@ class dataTransfer():
message
=
self
.
__sendSignal
(
signal
)
#TODO need to check correctness of signal?
self
.
streamStarted
=
None
self
.
queryNextStarted
=
None
try
:
if
self
.
signalSocket
:
self
.
log
.
info
(
"
closing signalSocket...
"
)
...
...
This diff is collapsed.
Click to expand it.
src/sender/SignalHandler.py
+
3
−
1
View file @
aff3a4c0
...
...
@@ -347,7 +347,9 @@ class SignalHandler():
variList
.
append
([])
else
:
# send error back to receiver
self
.
sendResponse
(
"
CONNECTION_ALREADY_OPEN
"
)
# self.sendResponse("CONNECTION_ALREADY_OPEN")
# "reopen" the connection and confirm to receiver
self
.
sendResponse
(
signal
)
def
__stopSignal
(
self
,
signal
,
socketIds
,
listToCheck
,
variList
,
correspList
):
...
...
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