如何检查延迟的作业是否正在重试(How to check if the delayed job is actually retrying)
我有以下方法
def max_attempts end但我想检查Internet是否不存在,或者我建立的第三方连接不可用。 我想延迟工作来重试它。 我已经关闭了互联网,但是我看不到Delayed::Job正在被填充。
I have the following method
def max_attempts endBut I want to check if Internet is not there, or the third party connection I am establishing is not available. I want delayed job to retry it. I have switched off internet, but I cannot see Delayed::Job getting populated.
最满意答案
你可以检查:
Delayed::Job.find(id).attemptsattempts应该告诉你它试图做的很多尝试,如果它达到最大值,它将停止尝试。
确保你没有在某处到错误,否则延迟工作会认为它的成功,并将从表中删除。
You can check:
Delayed::Job.find(id).attemptsattempts should show you haw many attempts it tried to do and if it reached the maximum it will stop trying.
Make sure you are not catching the error some where, otherwise the Delayed job will think its success and will be removed from the table.
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
推荐阅读
留言与评论(共有 9 条评论) |
本站网友 麦道夫 | 7分钟前 发表 |
如何检查延迟的作业是否正在重试(How to check if the delayed job is actually retrying) 我有以下方法 def max_attempts end 但我想检查Internet是否不存在 | |
本站网友 满脸痤疮 | 3分钟前 发表 |
或者我建立的第三方连接不可用 | |
本站网友 timewait | 13分钟前 发表 |
Job getting populated. 最满意答案 你可以检查: Delayed | |
本站网友 人力资源有哪些模块 | 20分钟前 发表 |
Job.find(id).attempts attempts should show you haw many attempts it tried to do and if it reached the maximum it will stop trying. Make sure you are not catching the error some where | |
本站网友 安装空调多少钱 | 17分钟前 发表 |
本站网友 宝硕 | 28分钟前 发表 |
but I cannot see Delayed | |
本站网友 德胜二手房 | 28分钟前 发表 |
Job正在被填充 | |
本站网友 妈妈吉利小叮当 | 17分钟前 发表 |
我想延迟工作来重试它 |