bpuig / laravel-subby

Laravel Plan and Subscriptions manager.
https://bpuig.github.io/laravel-subby
MIT License
102 stars 42 forks source link

Scheduler back to the main library? #83

Closed boryn closed 2 years ago

boryn commented 3 years ago

With all these things that pop up over and over again like:

I thought maybe it would be a good idea to make again a scheduler an integral part of this package?

But for wider compatibility I would resign from job batches. Actually, I would even resign from jobs altogether. Why not just make the implementation in the command ($schedule->command(...)->everyMinute()->runInBackground();)? Commands already run in background and using jobs seems to me superfluous. This would also demand less requirements - just running the scheduler and no need to configure queue drivers or worker.

For example, upon issuing a renewal, the task could be saved into plan_subscription_schedules to be run upon ends_at (or trial_ends_at) and scheduler will pick it up upon right moment and make appropriate changes.

bpuig commented 3 years ago

Just the other day I was thinking this, that I should revisit the schedule package and see if I can drop the job batch and bring it back here again here, since it's very useful.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bpuig commented 3 years ago

Shut up, stale bot! :stuck_out_tongue: