-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow tasks to be loaded from nested task directories #809
Conversation
ff536d8
to
13989bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#752 was already a fix in progress for this, maybe you can combine the two since we were waiting for the tests? That other implementation used a lambda to recursively load all the constants defined in modules found in namespace, which seems more correct.
13989bf
to
2e46061
Compare
Thanks @etiennebarrie, I wasn't aware of that one. I've cherry-picked the commit from that PR and have extended the tests to cover two levels of nesting. I've also added a section to the README. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including examples tasks (I just fixed them to make the succeed when you run them) and a README section!!
Co-authored-by: Masa (Aileron inc) <masa@aileron.cc>
In shop-server we have tasks which are in sub-folders (e.g.
app/tasks/maintenance/deep_understanding
). These are available in production, but in development they are not automatically loaded, making them harder to test (TODO: verify this).Before this PR, only tasks directly under
app/tasks
will be loaded in development. After this commit, one level of nesting is supported.