You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hoping for some advice/best practice. My understanding is that people commonly load the schedule in an initializer, something like Resque.schedule = yaml_schedule We've just upgraded to Rails 6 and switched to zeitwerk for loading and we're cleaning up the warnings about autoloading of classes no longer happening at initialization. For every job class that we're scheduling I now need to require it and all it's dependencies manually. It's a lot of classes and seems fiddly as classes are added and removed from the scheduler over time.
Hi there,
I'm hoping for some advice/best practice. My understanding is that people commonly load the schedule in an initializer, something like
Resque.schedule = yaml_schedule
We've just upgraded to Rails 6 and switched to zeitwerk for loading and we're cleaning up the warnings about autoloading of classes no longer happening at initialization. For every job class that we're scheduling I now need to require it and all it's dependencies manually. It's a lot of classes and seems fiddly as classes are added and removed from the scheduler over time.One other approach from manually loading everything in my initializer is to put the Resque.schedule call into an autoloader callback. This means that when a file changes rails could call that again. Will that create issues? https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: