Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using cached code #1151

Open
nomasprime opened this issue Sep 9, 2021 · 5 comments
Open

Using cached code #1151

nomasprime opened this issue Sep 9, 2021 · 5 comments

Comments

@nomasprime
Copy link

nomasprime commented Sep 9, 2021

Unfortunately when running with Rails in production Delayed Job insists on using old, presumably cached, code.

Surprisingly, after searching the issue to death, there doesn't seem to be any clear info on how to deploy this gem in production.

@nomasprime
Copy link
Author

Is Rails.cache.clear the way to deploy? Seems odd that it's not mentioned in readme if it is.

@danielmorrison
Copy link
Member

@nomasprime what makes you think it is using old code? It sounds like maybe you're not restarting the workers after a deploy.

See the Restarting docs: https://github.com/collectiveidea/delayed_job#restarting-delayed_job

@nomasprime
Copy link
Author

nomasprime commented Sep 9, 2021

Hi @danielmorrison

I've restarted many times and still the same result, spent the whole day trying to debug. Only Rails.cache.clear seems to fix it.

I have development and test environments deployed on Azure. With similar input they were both acting unexpectedly and different to local development. I tried everything I could think of and Rails.cache.clear fixed it on test. Want to understand what's going on and why restart doesn't work like it should.

I'm starting to wonder if relating to Docker build process. Restarted container where I ran the clear cache command and still works though.

@nomasprime
Copy link
Author

Just ran Rails.cache.clear on development env and didn't fix it this time. No idea what's going on with this.

@uurcank
Copy link

uurcank commented Dec 16, 2021

@nomasprime i am experiencing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants