7870: Teach crunch-dispatch to fail jobs it already locked.
authorBrett Smith <brett@curoverse.com>
Tue, 1 Dec 2015 15:38:09 +0000 (10:38 -0500)
committerBrett Smith <brett@curoverse.com>
Tue, 1 Dec 2015 21:20:18 +0000 (16:20 -0500)
commit44995fc2895a304737e324ea05f7e75e87f1458c
treed4dae7daa97e54ca886ddbc2e869228a890d0804
parent8788c145b860e19a1f04c4dc6abdcda14c859403
7870: Teach crunch-dispatch to fail jobs it already locked.

The fail_job method has been written with the assumption that the job
should be unlocked.  The retry support added in #4410 breaks this
assumption.  Teach fail_job to acquire the lock only when we don't
know we already have it.
services/api/lib/crunch_dispatch.rb