Also delete the job key when expiring a job
Otherwise, we can't requeue the job
This commit is contained in:
parent
fdcf8dbdbc
commit
ddb1ed7441
1 changed files with 7 additions and 0 deletions
|
@ -170,6 +170,13 @@ class EphemeralBuilderManager(BaseManager):
|
||||||
got_lock = yield From(self._take_etcd_atomic_lock('job-expired', build_job.build_uuid,
|
got_lock = yield From(self._take_etcd_atomic_lock('job-expired', build_job.build_uuid,
|
||||||
execution_id))
|
execution_id))
|
||||||
if got_lock:
|
if got_lock:
|
||||||
|
try:
|
||||||
|
# Clean up the bookkeeping for the job.
|
||||||
|
yield From(self._etcd_client.delete(self._etcd_job_key(build_job)))
|
||||||
|
except (KeyError, etcd.EtcdKeyError):
|
||||||
|
logger.debug('Could not delete job key %s; might have been removed already',
|
||||||
|
build_job.build_uuid)
|
||||||
|
|
||||||
logger.error('[BUILD INTERNAL ERROR] Build ID: %s. Exec name: %s. Exec ID: %s',
|
logger.error('[BUILD INTERNAL ERROR] Build ID: %s. Exec name: %s. Exec ID: %s',
|
||||||
build_job.build_uuid, executor_name, execution_id)
|
build_job.build_uuid, executor_name, execution_id)
|
||||||
yield From(self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE, executor_name,
|
yield From(self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE, executor_name,
|
||||||
|
|
Reference in a new issue