I have a server configured with Dokku in production that contains 1 worker running delayed_job to execute some codes in background, but when I make deploys, the code running with delayed job has a strange behavior and sometimes run my new code deployed and sometimes run my old code before deploy. It is as if there were two instances of the delayed job and at each moment one was executed.
Reading some posts here, i see that delayed job implements something like cache and it should be cleaned after and before deploy, but I did not find it as it does in dokku.
Does anyone know how to keep just the new version of the code running on the worker?