Skip to content

Commit 6366875

Browse files
authored
More notes (#125)
1 parent 4d5b11f commit 6366875

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/getting-started.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,19 @@ time period with `redelivery_timeout=` or `--redelivery-timeout`. You'd want to
268268
this to a value higher than the longest task you expect to run. For queues of very fast
269269
tasks, a few seconds may be ideal; for long data-processing steps involving large
270270
amount of data, you may need minutes.
271+
272+
## Delivery guarantees
273+
274+
Docket provides _at-least-once_ delivery semantics. When a worker picks up a
275+
task, if it crashes or fails to acknowledge within `redelivery_timeout`, the
276+
task will be considered unacknowledged and redelivered to another available
277+
worker. This ensures tasks are not lost but may be delivered more than once. To
278+
achieve exactly-once processing, design your tasks to be idempotent.
279+
280+
## Serialization and cloudpickle usage
281+
282+
Docket uses `cloudpickle` to serialize task functions and their arguments. This
283+
allows you to pass nearly any Python object as arguments to a task, but it also
284+
means that deserializing these arguments can execute arbitrary code. Avoid
285+
scheduling tasks from untrusted or unauthenticated sources to mitigate security
286+
risks.

0 commit comments

Comments
 (0)