I’m developing process automation using oban, but lately I’m facing a problem with updating the code in worker modules.
Whenever I update the module for the worker and start the application, the worker keeps processing jobs as if the code hasn’t been updated. In the worker module, even if I comment out everything that is in the perform(_job) function, the oban continues processing the code that was there. It’s like there’s some kind of cache.
ie.:
this job successfully run:
@impl Oban.Worker
def perform(_job) do
Users.list_users_from_last_day()
|> Emails.digest_email()
|> Mailer.deliver_now()
if I changes to:
@impl Oban.Worker
def perform(_job) do
IO.inspect("Nothing to do")
the previous job before the change continues to run successfully. Or if I change the tags for testing, they don’t change in db.
Another common error I’m experiencing is the “unknown worker”- oban error, when I change the worker set in config.exs.
I’ve already tried:
- clear cache files →
sudo rm -rf ./_build ./.elixir_ls ./mix.lock ~/.hex/cache.ets - recompile the app from scratch
Running through IEX or running the automated tests, everything works. The problem only occurs in homolog environment
Could anyone give a help on how to debug this problem?


















