aarondfrancis / laravel-pseudo-daemon

A Laravel package to mimic daemons via scheduled commands without having to change server configuration.
92 stars 12 forks source link

Some suggestions #7

Open bilogic opened 1 year ago

bilogic commented 1 year ago

Hi,

Gotta give it to you for this package! :) A few things came across my mind:

  1. I think it is better to have Daemon classes instead of requiring every daemon to be a command, this fills up artisan with commands which might be duplicate, especially if I prefer to keep my existing commands as just commands.
  2. Laravel's example is to call it this way $schedule->call(new DaemonClass)->everyMinute()...;. Offhand, I think it is even backward compatible to your current approach.
  3. Technically, it is still a daemon, just that the way it is started is "different", pseudo got me a bit confused there, i.e. half-daemon? My suggestion here is that a clearer name can help, your brief description was quite clear though.

Useful package!

bilogic commented 1 year ago

Ok, apparently, my way won't work because only ->command(...) and ->exec(...) can runInBackground()