Sexy.Bot.Dispatcher (Sexy v0.10.1)

Copy Markdown View Source

Serial update executor — your Sexy.Bot.Session callbacks run here.

The Sexy.Bot.Poller routes each update to one of the partitions (a PartitionSupervisor pool) keyed by chat id, so updates of the same chat are processed in order — the session state machine never sees them race — while different chats run concurrently across partitions.

A crashing handler is logged and the partition's queue moves on: isolation without losing ordering.

Note the ceiling: a slow handler delays other chats that hash into the same partition (head-of-line blocking).

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)