Skip to content
Snippets Groups Projects
Commit 7ab67155 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Using run instaead of popen for execution of cmsh command to wait for the...

Using run instaead of popen for execution of cmsh command to wait for the command to run before proceeding.
parent c427a7c8
No related branches found
No related tags found
3 merge requests!147Merge previous default branch feat-cod-rmq into main,!99Using run instaad of popen for execution of cmsh command,!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