@@ -528,7 +528,7 @@ def jobs(self):
528528 return self ._Jobs & {"table_name" : self .target .table_name }
529529
530530 def schedule_jobs (
531- self , * restrictions , purge_jobs = False , min_scheduling_interval = None
531+ self , * restrictions , min_scheduling_interval = None
532532 ):
533533 """
534534 Schedule new jobs for this autopopulate table by finding keys that need computation.
@@ -538,12 +538,8 @@ def schedule_jobs(
538538 2. If recent scheduling event exists, skips scheduling to prevent database load
539539 3. Otherwise, finds keys that need computation and schedules them
540540
541- The method also optionally purges invalid jobs (jobs that no longer exist in key_source)
542- to maintain database cleanliness.
543-
544541 Args:
545542 restrictions: a list of restrictions each restrict (table.key_source - target.proj())
546- purge_jobs: if True, remove orphaned jobs from the jobs table (potentially expensive operation)
547543 min_scheduling_interval: minimum time in seconds that must have passed since last job scheduling.
548544 If None, uses the value from dj.config["min_scheduling_interval"] (default: None)
549545
@@ -589,11 +585,8 @@ def schedule_jobs(
589585 logger .info (
590586 f"{ schedule_count } new jobs scheduled for `{ to_camel_case (self .target .table_name )} `"
591587 )
592- finally :
593- if purge_jobs :
594- self .purge_jobs ()
595588
596- def purge_jobs (self ):
589+ def cleanup_jobs (self ):
597590 """
598591 Check and remove any orphaned/outdated jobs in the JobTable for this autopopulate table.
599592
0 commit comments