Skip to content

v0.0.1

Choose a tag to compare

@github-actions github-actions released this 28 Nov 19:17
· 2 commits to main since this release
667e3c3

🚀 Added

  • facade: BaseDramatiqFacade, the door to the tasks of an application. A subclass names the directory and the pattern of the task modules; the instance imports them, wraps every actor in the actor middlewares, sends a task by its name with send_task(task_name, *args, delay=None, **kwargs), runs one in place with run_task_sync and lists the actors marked with @cron for a scheduler. Arguments pass through JSON on the way, so an actor gets what a real broker would deliver.
  • actor_middlewares: BaseActorMiddleware, a layer around the coroutine of every actor, and three of them: LogPropertiesManagerMiddleware enters the scope of the application's log properties registry for a run, SentryTagsMiddleware tags the Sentry scope with them, TaskLoggingMiddleware logs the start, the result and the failure of a run with its scalar arguments.
  • decorators: cron, the mark of a periodic actor.
  • middlewares, for the broker: AsyncShutdown runs coroutines on the worker's event loop on shutdown, to close async clients; HealthCheck serves /livez, /readyz and /startupz from the pings of the worker processes, each of which checks its threads and its event loop; PrometheusMetrics adds dramatiq_messages_enqueued_total and dramatiq_message_queue_time_milliseconds to dramatiq's own metrics.

Python 3.11 to 3.15, dramatiq >= 2.0, < 2.3, sentry-sdk >= 2.12, < 4.

Full Changelog: https://github.com/davyddd/dddramatiq/commits/v0.0.1