different dict
@@ -18,8 +18,8 @@ def set_status(status):
if worker in metrics:
metrics[worker].state(status[worker]['state'])
else:
- metrics[worker['name']] = Enum(worker['name'].replace('-', '_')+'_state',
- 'State of worker '+worker['name'],
+ metrics[worker] = Enum(worker.replace('-', '_')+'_state',
+ 'State of worker '+worker,
states=['In progress',
'Queued',
'Error',
