File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed
Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,8 @@ def ignore(self, key: dict) -> None:
420420 """
421421 Mark a key to be ignored (skipped during populate).
422422
423- Can be called on keys not yet in the jobs table.
423+ Only inserts new records. Existing job entries cannot be converted to
424+ ignore status - they must be cleared first.
424425
425426 Args:
426427 key: Primary key dict for the job
@@ -430,22 +431,10 @@ def ignore(self, key: dict) -> None:
430431 pk_attrs = [name for name , _ in self ._get_fk_derived_primary_key ()]
431432 job_key = {attr : key [attr ] for attr in pk_attrs if attr in key }
432433
433- # Check if job already exists
434- if job_key in self :
435- # Update existing job to ignore
436- key_conditions = " AND " .join (
437- f"`{ attr } `='{ job_key [attr ]} '" if isinstance (job_key [attr ], str ) else f"`{ attr } `={ job_key [attr ]} "
438- for attr in pk_attrs
439- )
440- sql = f"""
441- UPDATE { self .full_table_name }
442- SET status='ignore'
443- WHERE { key_conditions }
444- """
445- self .connection .query (sql )
446- else :
447- # Insert new job with ignore status
434+ try :
448435 self ._insert_job_with_status (job_key , "ignore" )
436+ except DuplicateError :
437+ pass # Already tracked
449438
450439 def _insert_job_with_status (self , key : dict , status : str ) -> None :
451440 """Insert a new job with the given status."""
You can’t perform that action at this time.
0 commit comments