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
8
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
dcad6010
Commit
dcad6010
authored
5 years ago
by
Bo-Chun Chen
Committed by
Ravi Tripathi
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Introduce new exchange confirm
parent
477d5d0d
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Feat rc_util add function
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rc_util.py
+4
-2
4 additions, 2 deletions
rc_util.py
with
4 additions
and
2 deletions
rc_util.py
+
4
−
2
View file @
dcad6010
...
...
@@ -2,6 +2,7 @@ from rc_rmq import RCRMQ
import
json
rc_rmq
=
RCRMQ
({
'
exchange
'
:
'
Request
'
})
confirm_rmq
=
RCRMQ
({
'
exchange
'
:
'
Confirm
'
})
tasks
=
{
'
ohpc_account
'
:
False
,
'
ohpc_homedir
'
:
False
,
'
ood_account
'
:
False
,
'
slurm_account
'
:
False
}
def
add_account
(
username
,
full
=
''
,
reason
=
''
):
...
...
@@ -28,13 +29,14 @@ def worker(ch, method, properties, body):
if
not
status
:
done
=
False
if
done
:
rc_rmq
.
stop_consume
()
confirm_rmq
.
stop_consume
()
confirm_rmq
.
delete_queue
()
def
consume
(
username
,
worker
,
debug
=
False
):
if
debug
:
sleep
(
5
)
else
:
r
c_rmq
.
start_consume
({
c
onfirm
_rmq
.
start_consume
({
'
queue
'
:
username
,
'
cb
'
:
worker
})
...
...
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