Skip to content

Commit

Permalink
only monitor active datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Feb 7, 2025
1 parent 9b9c821 commit 7df495b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iceprod/scheduled_tasks/dataset_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ async def process_dataset(rest_client, dataset_id):
dataset = await rest_client.request('GET', f'/datasets/{dataset_id}')
dataset_num = dataset['dataset']
dataset_status = dataset['status']
if dataset_status != 'processing':
return

with DatasetMonitorDuration.labels(name='dataset_monitor', dataset=str(dataset_num)).time():
jobs = await rest_client.request('GET', f'/datasets/{dataset_id}/job_counts/status')
jobs_counter = Counter()
Expand Down

0 comments on commit 7df495b

Please sign in to comment.