Improve log message in StuckImportsWorker
Taken from @DouweM comment in https://gitlab.com/gitlab-org/gitlab-ce/issues/33135#note_42350394
The error message is incorrect in this case. The Stuck worker checks if the JID is still queued/running, using
Gitlab::SidekiqStatus
. If it doesn't get a result, that means either that the job actually completed, or that 15 hours passed since the job was scheduled. In this case, it sounds like the job ran and finished quickly enough, but somehow stayed in thestarted
state, instead of transitioning tofinished
orfailed
. We should fix the error message, because it's very confusing right now.
On top of that, if some import jobs can be expected to take more than 15 hours, we should either up the timeout, or have these jobs periodically check in with
Gitlab::SidekiqStatus
to "renew" their "I am still running" Redis value.
Proposed fix
Make the clear distinction in Gitlab::SidekiqStatus
of an import_jid
that is still running when it hits the 15 hour mark and a import_jid
that does not exist anymore.