我已将超时设置为 -1,但作业在运行时仍会转到 FailedJobRegistry
queue = Queue(connection=self.conn, default_timeout=-1)
queue.enqueue(f, result_ttl=60, job_timeout=-1, *args, **kwargs)
{"job_id":"xxxxxxxxxxxxxxxxxxxxxxxxx","exc_info":"Moved to FailedJobRegistry at 2021-12-12 12:36:18.059156"}
同时,worker仍在运行
. . .
--- sample statements ---
job running passed level 1
job running passed level 2
job running passed level 3
and so on . . .
--- sample statements ---
. . .
最初它没有添加到 FailedJobs 中(它在 running_job_ids 中),但过了一段时间它就到了那里
当工人完成它的任务
for job_id in fld_reg.get_job_ids():
job = Job.fetch(job_id, connection=self.conn)
job_id 仍然在FailedJobRegistry但在这里它提出了
rq.exceptions.NoSuchJobError: No such job: b'rq:job:xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
18:26:34
工人已启动
18:28:25
工人已添加到 FailedRegistry
但工人正在运行并稍后成功完成任务18:34:12