adonis-scheduler icon indicating copy to clipboard operation
adonis-scheduler copied to clipboard

Cannot Load Tasks In Subdirectory

Open toksdotdev opened this issue 5 years ago • 6 comments

Due to the several Tasks that should execute to fulfill several aspects of our application, I desired a clean way of organizing our tasks.

In this light, decided to go with organizing similar tasks into subdirectories, only to discover that any task placed in a child directory/subdirectory(e.g. app/tasks/user/SendBirthdayWishes.js) aren't loaded into the scheduler.

Diving into the source code, I discovered that adonis-scheduler picks up only tasks placed directly(one-level down) in app/Tasks alone.

As a solution, we could get all the tasks placed in app/tasks/**/** recursively.

I could submit a PR for this if you desire.

Thanks.

toksdotdev avatar Jun 26 '19 03:06 toksdotdev

@TNkemdilim A PR for this would be nice

olaoluwa-98 avatar Dec 13 '19 23:12 olaoluwa-98

I'm yet to get a go ahead from the library author.

toksdotdev avatar Dec 14 '19 01:12 toksdotdev

@nrempel Is this package still maintained? Do you need help?

LeCoupa avatar May 11 '20 17:05 LeCoupa

@nrempel, it will be really nice if someone could open a PR for this

olaoluwa-98 avatar Jun 21 '20 20:06 olaoluwa-98

I think we should fork this, the author probably does not have the time to maintain it. @nrempel, can I take over this package please? :)

LeCoupa avatar Jun 21 '20 21:06 LeCoupa

The best alternative is to use this package: https://github.com/Rocketseat/adonis-bull

LeCoupa avatar Sep 28 '20 09:09 LeCoupa