Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
nrm
Commits
baab4950
Commit
baab4950
authored
Feb 11, 2019
by
Valentin Reis
Browse files
Merge branch 'minimize-zmq-threads' into 'master'
[fix] Resolve open files leaks See merge request
!57
parents
d3ae2478
7af15806
Pipeline
#5235
failed with stages
in 14 minutes and 32 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
baab4950
include
:
'
https://xgitlab.cels.anl.gov/argo/argotest/raw/master/gitlab/b
inary_rename
.yml'
include
:
'
https://xgitlab.cels.anl.gov/argo/argotest/raw/master/gitlab/b
asic
.yml'
stages
:
stages
:
-
style
-
style
...
...
default.nix
View file @
baab4950
...
@@ -3,5 +3,5 @@ let argotest =
...
@@ -3,5 +3,5 @@ let argotest =
"https://xgitlab.cels.anl.gov/argo/argotest/-/archive/master/argotest-master.tar.gz"
;
"https://xgitlab.cels.anl.gov/argo/argotest/-/archive/master/argotest-master.tar.gz"
;
in
import
"
${
argotest
}
/test.nix"
{
in
import
"
${
argotest
}
/test.nix"
{
nrm-override
=
./.
;
nrm-override
=
./.
;
testName
=
"
split
"
;
testName
=
"
base
"
;
}
}
nrm/containers.py
View file @
baab4950
...
@@ -248,7 +248,7 @@ class DummyRuntime(ContainerRuntime):
...
@@ -248,7 +248,7 @@ class DummyRuntime(ContainerRuntime):
def
execute
(
self
,
container_uuid
,
args
,
environ
):
def
execute
(
self
,
container_uuid
,
args
,
environ
):
import
tornado.process
as
process
import
tornado.process
as
process
return
process
.
Subprocess
(
args
,
stdin
=
process
.
Subprocess
.
STREAM
,
return
process
.
Subprocess
(
args
,
stdout
=
process
.
Subprocess
.
STREAM
,
stdout
=
process
.
Subprocess
.
STREAM
,
stderr
=
process
.
Subprocess
.
STREAM
,
stderr
=
process
.
Subprocess
.
STREAM
,
env
=
environ
)
env
=
environ
)
...
...
nrm/messaging.py
View file @
baab4950
...
@@ -162,7 +162,7 @@ class UpstreamRPCClient(object):
...
@@ -162,7 +162,7 @@ class UpstreamRPCClient(object):
def
__init__
(
self
,
address
):
def
__init__
(
self
,
address
):
self
.
address
=
address
self
.
address
=
address
self
.
uuid
=
str
(
uuid
.
uuid4
())
self
.
uuid
=
str
(
uuid
.
uuid4
())
self
.
zmq_context
=
zmq
.
Context
()
self
.
zmq_context
=
zmq
.
Context
.
instance
()
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
DEALER
)
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
DEALER
)
self
.
socket
.
setsockopt
(
zmq
.
IDENTITY
,
self
.
uuid
)
self
.
socket
.
setsockopt
(
zmq
.
IDENTITY
,
self
.
uuid
)
self
.
socket
.
connect
(
address
)
self
.
socket
.
connect
(
address
)
...
@@ -195,7 +195,7 @@ class UpstreamRPCServer(object):
...
@@ -195,7 +195,7 @@ class UpstreamRPCServer(object):
def
__init__
(
self
,
address
):
def
__init__
(
self
,
address
):
self
.
address
=
address
self
.
address
=
address
self
.
zmq_context
=
zmq
.
Context
()
self
.
zmq_context
=
zmq
.
Context
.
instance
()
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
ROUTER
)
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
ROUTER
)
self
.
socket
.
bind
(
address
)
self
.
socket
.
bind
(
address
)
...
@@ -234,7 +234,7 @@ class UpstreamPubServer(object):
...
@@ -234,7 +234,7 @@ class UpstreamPubServer(object):
def
__init__
(
self
,
address
):
def
__init__
(
self
,
address
):
self
.
address
=
address
self
.
address
=
address
self
.
zmq_context
=
zmq
.
Context
()
self
.
zmq_context
=
zmq
.
Context
.
instance
()
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
PUB
)
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
PUB
)
self
.
socket
.
setsockopt
(
zmq
.
LINGER
,
0
)
self
.
socket
.
setsockopt
(
zmq
.
LINGER
,
0
)
self
.
socket
.
bind
(
address
)
self
.
socket
.
bind
(
address
)
...
@@ -251,7 +251,7 @@ class UpstreamPubClient(object):
...
@@ -251,7 +251,7 @@ class UpstreamPubClient(object):
def
__init__
(
self
,
address
):
def
__init__
(
self
,
address
):
self
.
address
=
address
self
.
address
=
address
self
.
zmq_context
=
zmq
.
Context
()
self
.
zmq_context
=
zmq
.
Context
.
instance
()
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
SUB
)
self
.
socket
=
self
.
zmq_context
.
socket
(
zmq
.
SUB
)
self
.
socket
.
setsockopt
(
zmq
.
SUBSCRIBE
,
''
)
self
.
socket
.
setsockopt
(
zmq
.
SUBSCRIBE
,
''
)
self
.
socket
.
connect
(
address
)
self
.
socket
.
connect
(
address
)
...
...
nrm/subprograms.py
View file @
baab4950
...
@@ -118,7 +118,7 @@ class NodeOSClient(object):
...
@@ -118,7 +118,7 @@ class NodeOSClient(object):
for
envname
,
envval
in
environ
.
items
()]
for
envname
,
envval
in
environ
.
items
()]
cmd
+=
" env:'"
+
" "
.
join
(
env
)
+
"'"
cmd
+=
" env:'"
+
" "
.
join
(
env
)
+
"'"
args
.
append
(
cmd
)
args
.
append
(
cmd
)
return
process
.
Subprocess
(
args
,
stdin
=
process
.
Subprocess
.
STREAM
,
return
process
.
Subprocess
(
args
,
stdout
=
process
.
Subprocess
.
STREAM
,
stdout
=
process
.
Subprocess
.
STREAM
,
stderr
=
process
.
Subprocess
.
STREAM
)
stderr
=
process
.
Subprocess
.
STREAM
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment