Skip to content

Schedules — events

Per-module slice of docs/events-catalog.md (auto-generated). Update both files when adding or removing events.

Published

This module does not publish any events. Occupancy data is exposed via GET /api/v1/schedules/analytics/* endpoints, not events.

Subscribed

EventHandlerEffect
appointment.scheduledevents.py:on_appointment_scheduledRecompute occupancy aggregates for the affected (professional, day).
appointment.updatedevents.py:on_appointment_updatedSame — slot or duration may have moved.
appointment.cancelledevents.py:on_appointment_cancelledFree the slot in the occupancy aggregates.

The handlers must remain idempotent; agenda may re-publish on retry.

Adding a new event

Schedules does not publish events today. If a future feature needs to broadcast a state change:

  1. Add the constant to backend/app/core/events/types.py (EventType).
  2. Publish from the relevant service method, after the DB commit.
  3. Add the row to the Published table above.
  4. Run python backend/scripts/generate_catalogs.py to refresh the global catalog.