术语¶
Glossary
- ack¶
为 acknowledged 的简写。
Short for acknowledged.
- acknowledged¶
Worker 通过确认(acknowledge)消息来表示某条消息已被处理。如果未确认某条消息,则该消息将会被重新投递。事务在何时被视为失败取决于所使用的传输机制。在 AMQP 中,当连接或信道关闭(或丢失)时事务被视为失败;而在 Redis/SQS 中,事务在配置的时间(
visibility_timeout
)之后超时。Workers acknowledge messages to signify that a message has been handled. Failing to acknowledge a message will cause the message to be redelivered. Exactly when a transaction is considered a failure varies by transport. In AMQP the transaction fails when the connection/channel is closed (or lost), but in Redis/SQS the transaction times out after a configurable amount of time (the
visibility_timeout
).- apply¶
- billiard¶
是 Python multiprocessing 库的分支,包含了 Celery 所需的增强功能。
Fork of the Python multiprocessing library containing improvements required by Celery.
- calling¶
- cipater¶
Celery 3.1 版本以 Autechre 的歌曲命名(http://www.youtube.com/watch?v=OHsaqUr_33Y)
Celery release 3.1 named after song by Autechre (http://www.youtube.com/watch?v=OHsaqUr_33Y)
- context¶
- early ack¶
为 early acknowledgment 的简写。
Short for early acknowledgment
- early acknowledgment¶
任务在执行之前即时被 acknowledged,意味着如果机器在执行过程中断电,或者 worker 实例被突然终止,该任务不会被重新投递给其他 worker。
通过
task_acks_late
配置。Task is acknowledged just-in-time before being executed, meaning the task won't be redelivered to another worker if the machine loses power, or the worker instance is abruptly killed, mid-execution.
Configured using
task_acks_late
.- ETA¶
“预计到达时间(Estimated Time of Arrival)”,在 Celery 和 Google Task Queue 等系统中,用于表示延迟消息,即该消息在指定的 ETA 时间之前不应被处理。参见 预计到达时间和倒计时。
"Estimated Time of Arrival", in Celery and Google Task Queue, etc., used as the term for a delayed message that should not be processed until the specified ETA time. See 预计到达时间和倒计时.
- executing¶
- idempotent¶
幂等性是一个数学属性,描述一个函数可以被多次调用而不会改变结果。在实际应用中,这意味着函数可以重复调用而不会产生意外的副作用,但这并不意味着其完全无副作用(可与 nullipotent 对比)。
Idempotence is a mathematical property that describes a function that can be called multiple times without changing the result. Practically it means that a function can be repeated many times without unintended effects, but not necessarily side-effect free in the pure sense (compare to nullipotent).
Further reading: https://en.wikipedia.org/wiki/Idempotent
- kombu¶
Celery 使用的 Python 消息库,用于发送和接收消息。
Python messaging library used by Celery to send and receive messages.
- late ack¶
为 early acknowledgment 的简写。
Short for late acknowledgment
- late acknowledgment¶
任务在执行之后被 acknowledged (无论成功与否,包括抛出错误的情况),这意味着如果机器在任务执行过程中断电,或者 worker 被杀死,该任务将被重新投递给其他 worker。
通过
task_acks_late
配置。Task is acknowledged after execution (both if successful, or if the task is raising an error), which means the task will be redelivered to another worker in the event of the machine losing power, or the worker instance being killed mid-execution.
Configured using
task_acks_late
.- nullipotent¶
描述一个函数在被调用零次或多次时,仍具有相同效果并产生相同结果(完全无副作用)。是 idempotent 的更强版本。
describes a function that'll have the same effect, and give the same result, even if called zero or multiple times (side-effect free). A stronger version of idempotent.
- pidbox¶
进程邮箱,用于实现远程控制命令。
A process mailbox, used to implement remote control commands.
- prefetch count¶
- prefetch multiplier¶
预取计数(prefetch count) 通过
worker_prefetch_multiplier
设置配置,该值会乘以池中的槽位数量(线程/进程/绿色线程)。The prefetch count is configured by using the
worker_prefetch_multiplier
setting, which is multiplied by the number of pool slots (threads/processes/greenthreads).- reentrant¶
描述一个函数在执行过程中(例如被硬件中断或信号中断)可以被安全地中断,并可稍后重新调用。可重入性不同于 幂等性,因为其返回值在相同输入下不必一致,并且可重入函数可以有副作用,只要它们可以被安全中断;幂等函数总是可重入的,但反之则不然。
describes a function that can be interrupted in the middle of execution (e.g., by hardware interrupt or signal), and then safely called again later. Reentrancy isn't the same as idempotence as the return value doesn't have to be the same given the same inputs, and a reentrant function may have side effects as long as it can be interrupted; An idempotent function is always reentrant, but the reverse may not be true.
- request¶