We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5fcdd42 + eb777ff commit 4f12f17Copy full SHA for 4f12f17
src/grimoirelab/core/scheduler/tasks/models.py
@@ -131,8 +131,11 @@ def prepare_job_parameters(self):
131
job_args = args_gen.initial_args(self.task_args)
132
elif self.status == SchedulerStatus.COMPLETED:
133
job = self.jobs.all().order_by('-job_num').first()
134
- progress = ChroniclerProgress.from_dict(job.progress)
135
- job_args = args_gen.resuming_args(job.job_args['job_args'], progress)
+ if job and job.progress:
+ progress = ChroniclerProgress.from_dict(job.progress)
136
+ job_args = args_gen.resuming_args(job.job_args['job_args'], progress)
137
+ else:
138
+ job_args = args_gen.initial_args(self.task_args)
139
elif self.status == SchedulerStatus.RECOVERY:
140
141
if job and job.progress:
0 commit comments