nrempel / adonis-scheduler

This library provides an easy way to schedule recurring tasks for AdonisJS.
MIT License
104 stars 32 forks source link

Cannot Load Tasks In Subdirectory #28

Open toksdotdev opened 5 years ago

toksdotdev commented 5 years ago

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.

olaoluwa-98 commented 4 years ago

@TNkemdilim A PR for this would be nice

toksdotdev commented 4 years ago

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

LeCoupa commented 4 years ago

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

olaoluwa-98 commented 4 years ago

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

LeCoupa commented 4 years ago

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 commented 4 years ago

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