diff --git a/rc_rmq.py b/rc_rmq.py index 41ec7b3a8e90c2dd18a7ff4361693374ea2c8153..42e49137457f7ffdbe6f3156881a1fceca029ad8 100644 --- a/rc_rmq.py +++ b/rc_rmq.py @@ -61,7 +61,7 @@ class RCRMQ(object): self._connection = pika.BlockingConnection(self._parameters) self._channel = self._connection.channel() self._channel.exchange_declare( - exchange=self.EXCHANGE, + exchange=self.EXCHANGE, exchange_type=self.EXCHANGE_TYPE, durable=True) diff --git a/rc_util.py b/rc_util.py index 3fb55fddcb35082065646d99354d31144d94b869..8b90fce92b86c7e8465d3664c0c1271bdca404db 100644 --- a/rc_util.py +++ b/rc_util.py @@ -25,11 +25,11 @@ def worker(ch, method, properties, body): for key, status in tasks.items(): if not status: print("{} is not done yet.".format(key)) - done = False + done = False if done: confirm_rmq.stop_consume() confirm_rmq.delete_queue() - + def consume(username, callback, debug=False): if debug: sleep(5) @@ -39,5 +39,5 @@ def consume(username, callback, debug=False): 'routing_key': 'confirm.' + username, 'cb': callback }) - + return { 'success' : True } diff --git a/slurm_agent.py b/slurm_agent.py index 221dc8d84e5891c5318e5074ff77fd269766d349..e07af9bd233b952aa385848a4504859f31a22177 100755 --- a/slurm_agent.py +++ b/slurm_agent.py @@ -16,7 +16,7 @@ def slurm_account_create(ch, method, properties, body): success = False try: 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)) success = True except: