Exemple #1
0
 def run_job(self, job):
     self.success_flag, self.status_desc = job(batch_name=self.batch_name,
                                               batch_key=self.batch_key,
                                               last_batch_key=self.last_batch_key,
                                               last_batch_success_flag=self.last_batch_success_flag,
                                               task_name=self.task_name,
                                               config_filename=self.config_filename,
                                               raw_conn=self.raw_conn,
                                               raw_db_cursor=self.raw_db_cursor)
     # If failure, stop the process
     if not self.success_flag:
         # Update batch row
         update_ops_batch(self.raw_db_cursor, self.batch_start_time, self.success_flag,
                          self.status_desc, self.batch_key)
         return False
     return True
Exemple #2
0
 def run_job(self, job):
     self.success_flag, self.status_desc = job(
         batch_name=self.batch_name,
         batch_key=self.batch_key,
         last_batch_key=self.last_batch_key,
         last_batch_success_flag=self.last_batch_success_flag,
         task_name=self.task_name,
         config_filename=self.config_filename,
         raw_conn=self.raw_conn,
         raw_db_cursor=self.raw_db_cursor)
     # If failure, stop the process
     if not self.success_flag:
         # Update batch row
         update_ops_batch(self.raw_db_cursor, self.batch_start_time,
                          self.success_flag, self.status_desc,
                          self.batch_key)
         return False
     return True
Exemple #3
0
 def update_batch(self):
     # Update batch
     update_ops_batch(self.raw_db_cursor, self.batch_start_time, self.success_flag, self.status_desc, self.batch_key)
Exemple #4
0
 def update_batch(self):
     # Update batch
     update_ops_batch(self.raw_db_cursor, self.batch_start_time,
                      self.success_flag, self.status_desc, self.batch_key)