Skip to content
Snippets Groups Projects
Commit 134e5cf5 authored by Michael D. M. Dryden's avatar Michael D. M. Dryden
Browse files

Add experiment UUID and ignore repeated experiment requests

parent 762cb238
No related merge requests found
......@@ -131,10 +131,19 @@ class DStatDaemon(object):
return {'status': 'done'}
async def run(self):
received_commands = set()
while True:
command: str
payload: dict
command, payload = pickle.loads(await self.socket_ctrl.arecv())
received = pickle.loads(await self.socket_ctrl.arecv())
if len(received) == 3:
exp_uuid, command, payload = received
if exp_uuid in received_commands: # Ignore previously handled commands
continue
logger.info('Got Experiment %s', exp_uuid)
received_commands.add(exp_uuid)
else:
command, payload = received
await self.socket_ctrl.asend(pickle.dumps(await (self.command_map[command](payload))))
def close(self):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment