I am sending push notifications from my server and want it to simply be executed in a background process. I've read the Laravel docs and I know about database driver and some other options as well. I've got it working with database driver on my local machine but one thing is bugging me that I've to start a background thread to listen for jobs which gets added to the queue using php artisan queue:listen --deamon
.
关键是,它总是像"老太婆"一样运行,消耗我的一些资源和内存.我只想在触发推送通知时创建一个新流程,它应该在添加后立即开始执行,之后该流程应该关闭.另一方面,对于laravel作业(job),我总是需要运行一个我想要避免的后台进程,而且我使用的是一个共享主机,它不允许我在服务器上安装"supervisor"来监控作业(job)的执行.
Can anyone clear this ambiguity?? What will be the better way to handle this scenario?