Skip to content

Commit

Permalink
Improve monitor script when sending worker offline alert (codalab#2503)
Browse files Browse the repository at this point in the history
Co-authored-by: Jing Ge <stanford@Stanfords-MacBook-Pro.local>
  • Loading branch information
candicegjing and Jing Ge committed Jun 24, 2020
1 parent 13bbbc8 commit 9cf494b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion monitor.py
Expand Up @@ -73,7 +73,7 @@
os.mkdir(args.backup_path)

# Comma-separated list of worker ids to monitor. Example: vm-clws-prod-worker-0,vm-clws-prod-worker-1
public_workers = set(os.environ['CODALAB_PUBLIC_WORKERS'].split(','))
public_workers = set([worker.strip() for worker in os.environ['CODALAB_PUBLIC_WORKERS'].split(',')])

report = [] # Build up the current report to send in an email

Expand Down Expand Up @@ -260,6 +260,7 @@ def poll_online_workers():
error_logs(
'worker check failed', 'Missing value for environment variable CODALAB_PUBLIC_WORKERS.'
)
return
lines = run_command(['cl', 'workers']).split('\n')
workers_info = lines[2:]
online_workers = set()
Expand Down

0 comments on commit 9cf494b

Please sign in to comment.