Example #1
0
 def format(self):
     result = copy.copy(self.__dict__)
     result['next_run_time'] = timestamp_to_str(self.next_run_time)
     result['overrun_policy'] = OverrunPolicy.to_string(self.overrun_policy)
     result['max_running_instances'] = str(self.max_running_instances)
     result['parser_params'] = str(self.parser_params)
     return result
Example #2
0
 def format(self):
     result = copy.copy(self.__dict__)
     result['next_run_time'] = timestamp_to_str(self.next_run_time)
     result['overrun_policy'] = OverrunPolicy.to_string(self.overrun_policy)
     result['max_running_instances'] = str(self.max_running_instances)
     result['parser_params'] = str(self.parser_params)
     return result
Example #3
0
 def __str__(self):
     if self.next_run_time:
         next_run_time = timestamp_to_str(self.next_run_time)
     else:
         next_run_time = str(self.next_run_time)
     if self.recurrence_seconds:
         delta = datetime.timedelta(seconds=self.recurrence_seconds)
         recurrence = str(delta)
     else:
         recurrence = str(self.recurrence_seconds)
     if self.overrun_policy is not None:
         overrun_policy = OverrunPolicy.to_string(self.overrun_policy)
     else:
         overrun_policy = str(self.overrun_policy)
     return ('WorkflowSchedule(next_run_time=%s, recurrence=%s, '
             'overrun_policy=%s, parser_params=%s, workflow=%s, '
             'email=%s, max_running_instances=%s)' %
             (next_run_time, recurrence, overrun_policy, self.parser_params,
              self.workflow, self.emails, str(self.max_running_instances)))
Example #4
0
 def __str__(self):
     if self.next_run_time:
         next_run_time = timestamp_to_str(self.next_run_time)
     else:
         next_run_time = str(self.next_run_time)
     if self.recurrence_seconds:
         delta = datetime.timedelta(seconds=self.recurrence_seconds)
         recurrence = str(delta)
     else:
         recurrence = str(self.recurrence_seconds)
     if self.overrun_policy is not None:
         overrun_policy = OverrunPolicy.to_string(self.overrun_policy)
     else:
         overrun_policy = str(self.overrun_policy)
     return ('WorkflowSchedule(next_run_time=%s, recurrence=%s, '
             'overrun_policy=%s, parser_params=%s, workflow=%s, '
             'email=%s, max_running_instances=%s)' % (next_run_time,
                                                      recurrence,
                                                      overrun_policy,
                                                      self.parser_params,
                                                      self.workflow,
                                                      self.emails,
                                                      str(self.max_running_instances)))