File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -470,16 +470,9 @@ def _populate1(
470470 logger .error (error )
471471 return key , error if return_exception_objects else error_message
472472 else :
473- self .connection .commit_transaction ()
474- self ._Jobs .complete (
475- self .target .table_name ,
476- self ._job_key (key ),
477- run_duration = (datetime .datetime .utcnow () - make_start ).total_seconds (),
478- )
479473 # Update the _job column with the job metadata for newly populated entries
480474 if "_job" in self .target .heading ._attributes :
481475 job_metadata = {
482- "execution_time" : make_start ,
483476 "execution_duration" : (
484477 datetime .datetime .utcnow () - make_start
485478 ).total_seconds (),
@@ -490,7 +483,12 @@ def _populate1(
490483 }
491484 for k in (self .target & key ).fetch ("KEY" ):
492485 self .target .update1 ({** k , "_job" : job_metadata })
493-
486+ self .connection .commit_transaction ()
487+ self ._Jobs .complete (
488+ self .target .table_name ,
489+ self ._job_key (key ),
490+ run_duration = (datetime .datetime .utcnow () - make_start ).total_seconds (),
491+ )
494492 logger .debug (f"Success making { key } -> { self .target .full_table_name } " )
495493 return True
496494 finally :
You can’t perform that action at this time.
0 commit comments