Skip to content

Commit

Permalink
Merge pull request #30 from nattvara/reschedule-analysis-of-all-lectures
Browse files Browse the repository at this point in the history
Reschedule analysis of all lectures
  • Loading branch information
nattvara authored Mar 8, 2023
2 parents f1d0e4c + f9ad4e0 commit 51ca250
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jobs/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
get_all_lectures,
)
from jobs import (
schedule_analysis_of_lecture,
schedule_cleanup_of_lecture,
get_metadata_queue,
capture_preview,
Expand Down Expand Up @@ -55,3 +56,12 @@ def cleanup_for_all_lectures():
for lecture in lectures:
print(f'scheduling clean of {lecture.id}')
schedule_cleanup_of_lecture(lecture)


def reanalyse_all_lectures():
print('dispatching jobs to re-analyse all lectures')

lectures = get_all_ready_lectures()
for lecture in lectures:
print(f'scheduling analysis of {lecture.id}')
schedule_analysis_of_lecture(lecture)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'invalidate_query_cache = db.cmd:invalidate_all_query_caches',
'analysis_queues_restart = jobs:analysis_queues_restart',
'dispatch_fetch_metadata_for_all_lectures = jobs.cmd:fetch_metadata_for_all_lectures',
'dispatch_analysis_for_all_lectures = jobs.cmd:reanalyse_all_lectures',
'dispatch_capture_preview_for_all_lectures = jobs.cmd:capture_preview_for_all_lectures',
'dispatch_cleanup_for_all_lectures = jobs.cmd:cleanup_for_all_lectures',
'fetch_kth_courses = courses.cmd:fetch_kth_courses',
Expand Down

0 comments on commit 51ca250

Please sign in to comment.