Skip to content
Snippets Groups Projects
Commit da7225e7 authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Adapt msg passing to fit workflow/task manager agent.

Conflicts:
	get-next-uid-gid.py
parent eb53c160
No related branches found
No related tags found
6 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!51Fix acct create wait,!39WIP:Feat cod rmq,!38WIP: Feat cod rmq,!28Feat resolve uid gid
......@@ -57,6 +57,8 @@ def get_next_uid_gid(ch, method, properties, body):
awk -F: '($3>10000) && ($3<20000) && ($3>maxgid) { maxgid=$3; } END { print maxgid+1; }'"
msg['gid'] = popen(cmd_gid).read().rstrip()
logger.info(f"GID query: {cmd_gid}")
msg['task'] = task
msg['success'] = True
except Exception:
logger.exception("Fatal error:")
......@@ -67,21 +69,10 @@ def get_next_uid_gid(ch, method, properties, body):
logger.debug('rc_rmq.publish_msg()')
rc_rmq.publish_msg({
'routing_key': 'confirm.' + username,
'msg': {
'task': task,
'success': success
}
'msg': msg
})
logger.info('confirmation sent')
if success:
# Send create message to BrightCM agent
logger.info(f'The task {task} finished, sending create msg to next queue')
rc_rmq.publish_msg({
'routing_key': 'create.' + username,
'msg': msg
})
logger.info("Start listening to queue: {}".format(task))
rc_rmq.start_consume({
'queue': task,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment