def get_next_run_time(self): try: return deserialize_dt(DjangoJob.objects.filter(next_run_time__isnull=False).earliest('next_run_time').next_run_time) except ObjectDoesNotExist: # no active jobs return except: LOGGER.exception("Exception during get_next_run_time for jobs")
def get_next_run_time(self): try: return deserialize_dt( DjangoJob.objects.filter(next_run_time__isnull=False).earliest( 'next_run_time').next_run_time) except AttributeError: # no active jobs return None
def map_jobs(job): job.next_run_time = deserialize_dt(job.next_run_time) return job
def get_next_run_time(self): try: return deserialize_dt(DjangoJob.objects.first().next_run_time) except AttributeError: # no active jobs return None