什么构成了作业队列中的重试?
我最初在 Zend 论坛上发布了这个问题,但认为在这里发布也是明智的。
到底要发生什么情况才能重试作业?我尝试过超时、50x 响应代码,并将状态设置为“失败”。
我有一个创建作业的简单脚本...
$job_url = 'http://localhost/consumer.php?time=' . microtime(true);
$job_queue = new ZendJobQueue();
$job_options = array(
'name' => 'Test Job'
);
$job_id = $job_queue->createHttpJob(
$job_url,
array(),
$job_options
);
我尝试通过删除consumer.php、从consumer.php 中返回500 以及让consumer.php 花费的时间超过设置的120 秒来触发作业重试对于 jqd.ini 中的 zend_jobqueue.http_job_timeout 。这些似乎都不会触发重试。
那么,我问,什么实际上会触发重试?
请帮忙。
I originally posted this question over at the Zend Forums but figured it would also be wise to post here.
What has to happen, exactly, for a job to retry? I've tried timeouts, 50x response codes, and setting the status to "FAILED".
I have a simple script that creates a job...
$job_url = 'http://localhost/consumer.php?time=' . microtime(true);
$job_queue = new ZendJobQueue();
$job_options = array(
'name' => 'Test Job'
);
$job_id = $job_queue->createHttpJob(
$job_url,
array(),
$job_options
);
I've tried to trigger a retry of the job by removing consumer.php, returning a 500 from within consumer.php, and having consumer.php take longer than the 120 seconds set for zend_jobqueue.http_job_timeout in the jqd.ini. None of these appear to trigger a retry.
So, I ask, what actually will trigger a retry?
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在通过电子邮件、电话以及在 ZendCon 2010 上亲自与 Zend 工程团队进行大量对话后,发现答案是作业队列实用程序中的一个错误。
Zend Server 5.0.4 版本包含对作业队列实用程序的修复,特别是为了更好地重试处理 HTTP 错误。
查看发行说明。
很抱歉延迟清理这个问题。
After a great deal of conversations with the Zend engineering team - via email, phone and in-person at ZendCon 2010 - the answer was discovered to be a bug in the Job Queue utility.
Version 5.0.4 of Zend Server contained a fix to the Job Queue utility, specifically for better retry handling from HTTP errors.
Check out the release notes.
Sorry for the delay in cleaning up this question.