[英]How to throttle a job in laravel scheduler
I have a job set up in laravel scheduler which currently takes about 20minutes to finish running from start to finish.我在 laravel 调度程序中设置了一个作业,目前从开始到结束运行大约需要 20 分钟。
However, I have recently been facing an error where the job get's 'killed' prematurely and i get an email notifying me that I have exceeded the rate limit of 90 API request per minute.但是,我最近遇到了一个错误,即作业过早地“终止” ,并且我收到 email 通知我,我已超过每分钟 90 个 API 请求的速率限制。
Is there any way that I can implement some sort of throttle on the laravel scheduler job?有什么方法可以在 laravel 调度程序作业上实现某种节流?
Laravel Project Information Laravel项目信息
-Laravel Version 5.5 -Laravel 5.5 版
-PHP 7.4 -PHP 7.4
-Hosted on Nginx -托管在 Nginx
Yes laravel calls it "rate limiting" https://laravel.com/docs/9.x/queues#rate-limiting是的 laravel 称之为“速率限制” https://laravel.com/docs/9.x/queues#rate-limiting
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.