我们将芹菜与Redis用作后端,并将RabbitMQ作为代理。我们遇到了一个有趣的场景,我们不清楚如何从中恢复。任务的执行顺序如下:
有两件事我们不清楚: 1.如何将此异常标记为可重试。可以说,该异常不在我们任务的执行上下文范围内 2.如果任务A是和弦的一部分,如何确保和弦的回调被调用
P.S .:这是个例外:
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 435, in trace_task
uuid, retval, task_request, publish_result,
File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 146, in mark_as_done
self.on_chord_part_return(request, state, result)
File "/usr/local/lib/python2.7/dist-packages/celery/backends/redis.py", line 272, in on_chord_part_return
.expire(tkey, self.expires) \
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 2894, in execute
return execute(conn, stack, raise_on_error)
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 2749, in _execute_transaction
connection.send_packed_command(all_cmds)
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 489, in connect
raise ConnectionError(self._error_message(e))
ConnectionError: Error -3 connecting to <redis_service>. Temporary failure in name resolution.