Skip to content

Commit

Permalink
Merge pull request #686 from pennlabs/pathsync_cron
Browse files Browse the repository at this point in the history
Add Cronjob for Path Status Sync
  • Loading branch information
esinx authored Nov 19, 2024
2 parents 765d0c3 + 70644a9 commit 007a2fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/courses/management/commands/sync_path_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def resolve_path_differences(send_data_to_slack=False, verbose=False):
url,
data=json.dumps(
{
"text": f"{len(inconsistent_courses)} inconsistent Course "
"text": f"{len(inconsistent_courses)} Inconsistent Course "
+ f"Statuses Resolved: {inconsistent_courses}"
}
),
Expand Down
7 changes: 7 additions & 0 deletions k8s/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ export class MyChart extends PennLabsChart {
secret,
cmd: ['python', 'manage.py', 'alertstats', '1', '--slack'],
})

new CronJob(this, 'sync-path-course-statuses', {
schedule: cronTime.everyHour(),
image: backendImage,
secret,
cmd: ['python', 'manage.py', 'sync_path_status', '--slack'],
})
}
}

Expand Down

0 comments on commit 007a2fd

Please sign in to comment.