Skip to content
Snippets Groups Projects
Unverified Commit 3eae0b61 authored by Ravi Tripathi's avatar Ravi Tripathi Committed by GitHub
Browse files

Merge pull request #99 from rtripath89/feat_wait_for_cmsh

Using run instaad of popen for execution of cmsh command
parents d2ac5676 7ab67155
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!94WIP: Merge feat_prod_rmq with feat_cod_rmq
......@@ -9,6 +9,8 @@ import rc_util
from os import popen
from rc_rmq import RCRMQ
import rabbit_config as rcfg
from subprocess import run
import shlex
task = "create_account"
......@@ -21,6 +23,8 @@ args = rc_util.get_args()
logger = rc_util.get_logger()
# Account creation
def create_account(msg):
logger.info(f"Account creation request received: {msg}")
......@@ -36,7 +40,7 @@ def create_account(msg):
cmd += 'commit;"'
if not args.dry_run:
popen(cmd)
run(shlex.split(cmd))
time.sleep(rcfg.Delay)
logger.info(f"Bright command to create user:{cmd}")
......
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