Skip to main content

Module sync_tasks

Module sync_tasks 

Source
Expand description

Durable sync tasks that Welcome processing and device sync enqueue inside their own storage transactions.

Functionsยง

schedule_add_missing_installations
Durably enqueue one AddMissingInstallations task for group_id (deduped by payload hash against any pending row for the same group) and wake the TaskRunner. The task is due once delay, a rate-limit delay, has passed. A task until_done never expires, and a failing one backs off to at most one run an interval.
schedule_newcomer_adds
A new sync group from a Welcome means a new installation: schedule one durable task per eligible group, with bounded DM extras (deduped by payload hash), in the transaction that installs the Welcome, so a restart cannot lose them.