Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rabbitmq_agents
Manage
Activity
Members
Labels
Plan
Issues
16
Issue boards
Milestones
Wiki
Code
Merge requests
10
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
rc
rabbitmq_agents
Commits
cafdc8e0
Commit
cafdc8e0
authored
5 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Add/remove whitespace
Remove trailing whitespace Add space between '+'
parent
16e24b6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!23
Feat resolve uid gid
,
!18
Redesign RabbitMQ
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
rc_rmq.py
+1
-1
1 addition, 1 deletion
rc_rmq.py
rc_util.py
+3
-3
3 additions, 3 deletions
rc_util.py
slurm_agent.py
+1
-1
1 addition, 1 deletion
slurm_agent.py
with
5 additions
and
5 deletions
rc_rmq.py
+
1
−
1
View file @
cafdc8e0
...
@@ -61,7 +61,7 @@ class RCRMQ(object):
...
@@ -61,7 +61,7 @@ class RCRMQ(object):
self
.
_connection
=
pika
.
BlockingConnection
(
self
.
_parameters
)
self
.
_connection
=
pika
.
BlockingConnection
(
self
.
_parameters
)
self
.
_channel
=
self
.
_connection
.
channel
()
self
.
_channel
=
self
.
_connection
.
channel
()
self
.
_channel
.
exchange_declare
(
self
.
_channel
.
exchange_declare
(
exchange
=
self
.
EXCHANGE
,
exchange
=
self
.
EXCHANGE
,
exchange_type
=
self
.
EXCHANGE_TYPE
,
exchange_type
=
self
.
EXCHANGE_TYPE
,
durable
=
True
)
durable
=
True
)
...
...
This diff is collapsed.
Click to expand it.
rc_util.py
+
3
−
3
View file @
cafdc8e0
...
@@ -25,11 +25,11 @@ def worker(ch, method, properties, body):
...
@@ -25,11 +25,11 @@ def worker(ch, method, properties, body):
for
key
,
status
in
tasks
.
items
():
for
key
,
status
in
tasks
.
items
():
if
not
status
:
if
not
status
:
print
(
"
{} is not done yet.
"
.
format
(
key
))
print
(
"
{} is not done yet.
"
.
format
(
key
))
done
=
False
done
=
False
if
done
:
if
done
:
confirm_rmq
.
stop_consume
()
confirm_rmq
.
stop_consume
()
confirm_rmq
.
delete_queue
()
confirm_rmq
.
delete_queue
()
def
consume
(
username
,
callback
,
debug
=
False
):
def
consume
(
username
,
callback
,
debug
=
False
):
if
debug
:
if
debug
:
sleep
(
5
)
sleep
(
5
)
...
@@ -39,5 +39,5 @@ def consume(username, callback, debug=False):
...
@@ -39,5 +39,5 @@ def consume(username, callback, debug=False):
'
routing_key
'
:
'
confirm.
'
+
username
,
'
routing_key
'
:
'
confirm.
'
+
username
,
'
cb
'
:
callback
'
cb
'
:
callback
})
})
return
{
'
success
'
:
True
}
return
{
'
success
'
:
True
}
This diff is collapsed.
Click to expand it.
slurm_agent.py
+
1
−
1
View file @
cafdc8e0
...
@@ -16,7 +16,7 @@ def slurm_account_create(ch, method, properties, body):
...
@@ -16,7 +16,7 @@ def slurm_account_create(ch, method, properties, body):
success
=
False
success
=
False
try
:
try
:
subprocess
.
call
([
"
sudo
"
,
"
sacctmgr
"
,
"
add
"
,
"
account
"
,
username
,
"
-i
"
,
"
Descripition: Add user
"
])
subprocess
.
call
([
"
sudo
"
,
"
sacctmgr
"
,
"
add
"
,
"
account
"
,
username
,
"
-i
"
,
"
Descripition: Add user
"
])
subprocess
.
call
([
"
sudo
"
,
"
sacctmgr
"
,
"
add
"
,
"
user
"
,
username
,
"
account=
"
+
username
,
"
-i
"
])
subprocess
.
call
([
"
sudo
"
,
"
sacctmgr
"
,
"
add
"
,
"
user
"
,
username
,
"
account=
"
+
username
,
"
-i
"
])
print
(
"
SLURM account for user {} has been added
"
.
format
(
username
))
print
(
"
SLURM account for user {} has been added
"
.
format
(
username
))
success
=
True
success
=
True
except
:
except
:
...
...
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