simple-module-background-tasks 0.0.39__tar.gz → 0.0.41__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/PKG-INFO +5 -5
  2. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_clock.py +3 -5
  3. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_transport.py +5 -2
  4. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/package.json +1 -1
  5. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/pyproject.toml +5 -5
  6. simple_module_background_tasks-0.0.41/tests/test_bg_outbox_eager_serialization.py +55 -0
  7. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/.gitignore +0 -0
  8. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/LICENSE +0 -0
  9. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/README.md +0 -0
  10. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/__init__.py +0 -0
  11. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/_lifecycle.py +0 -0
  12. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/_signal_bus.py +0 -0
  13. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/_signal_support.py +0 -0
  14. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/after_commit.py +0 -0
  15. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/celery_app.py +0 -0
  16. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/config_guards.py +0 -0
  17. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/constants.py +0 -0
  18. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/contracts/__init__.py +0 -0
  19. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/contracts/events.py +0 -0
  20. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/contracts/logs.py +0 -0
  21. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/contracts/outbox.py +0 -0
  22. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/contracts/schemas.py +0 -0
  23. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/db_settings.py +0 -0
  24. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/deps.py +0 -0
  25. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/__init__.py +0 -0
  26. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/api_admin.py +0 -0
  27. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/api_status.py +0 -0
  28. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/logs_api.py +0 -0
  29. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/logs_views.py +0 -0
  30. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/outbox_api.py +0 -0
  31. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/outbox_views.py +0 -0
  32. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/endpoints/views.py +0 -0
  33. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/filters.py +0 -0
  34. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/health.py +0 -0
  35. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/invalidation.py +0 -0
  36. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/locales/de.json +0 -0
  37. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/locales/en.json +0 -0
  38. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/log_context.py +0 -0
  39. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/log_purge.py +0 -0
  40. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/log_service.py +0 -0
  41. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/log_sink.py +0 -0
  42. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/models.py +0 -0
  43. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/module.py +0 -0
  44. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_claim.py +0 -0
  45. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_dispatch.py +0 -0
  46. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_guard.py +0 -0
  47. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_loop.py +0 -0
  48. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_service.py +0 -0
  49. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_support.py +0 -0
  50. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_sweep.py +0 -0
  51. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/outbox_worker.py +0 -0
  52. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/Detail.tsx +0 -0
  53. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/Index.tsx +0 -0
  54. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/Logs.tsx +0 -0
  55. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/Outbox.tsx +0 -0
  56. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/Workers.tsx +0 -0
  57. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/api.generated.ts +0 -0
  58. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/api.ts +0 -0
  59. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/DetailFacts.tsx +0 -0
  60. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/ExecutionRow.tsx +0 -0
  61. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/ExecutionsTable.tsx +0 -0
  62. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/LogLevelSelect.tsx +0 -0
  63. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/LogTable.tsx +0 -0
  64. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/LogsPanel.tsx +0 -0
  65. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/OutboxTable.tsx +0 -0
  66. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/PayloadCards.tsx +0 -0
  67. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/ProgressCard.tsx +0 -0
  68. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/RetryAllDialog.tsx +0 -0
  69. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/RetryConfirmDialog.tsx +0 -0
  70. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/RoutesTable.tsx +0 -0
  71. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/StatusPill.tsx +0 -0
  72. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/StatusStrip.tsx +0 -0
  73. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/TaskFilters.tsx +0 -0
  74. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/TasksEmpty.tsx +0 -0
  75. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/TracebackCard.tsx +0 -0
  76. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/WorkerCard.tsx +0 -0
  77. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/WorkerEmptyStates.tsx +0 -0
  78. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/components/WorkerHealthBanner.tsx +0 -0
  79. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/constants.ts +0 -0
  80. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/logs.ts +0 -0
  81. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/outbox.ts +0 -0
  82. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/retry.ts +0 -0
  83. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/pages/worker-health.ts +0 -0
  84. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/py.typed +0 -0
  85. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/retry_service.py +0 -0
  86. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/runner.py +0 -0
  87. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/service.py +0 -0
  88. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/services.py +0 -0
  89. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/settings.py +0 -0
  90. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/settings_celery.py +0 -0
  91. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/settings_env_checks.py +0 -0
  92. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/settings_logs.py +0 -0
  93. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/signals.py +0 -0
  94. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/sync_db.py +0 -0
  95. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/task_heartbeat.py +0 -0
  96. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/task_routing.py +0 -0
  97. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/tasks.py +0 -0
  98. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/tenant_context.py +0 -0
  99. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/worker_inspector.py +0 -0
  100. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/worker_settings.py +0 -0
  101. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/background_tasks/workers_state.py +0 -0
  102. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/conftest.py +0 -0
  103. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_admin_api.py +0 -0
  104. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_background_tasks_after_commit.py +0 -0
  105. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_background_tasks_heartbeat.py +0 -0
  106. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_background_tasks_settings.py +0 -0
  107. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_background_tasks_tz_columns.py +0 -0
  108. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_beat_schedule.py +0 -0
  109. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_config_guards.py +0 -0
  110. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_db_timeouts.py +0 -0
  111. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_index_has_executions.py +0 -0
  112. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_index_worker_presence.py +0 -0
  113. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_inprocess_sweep.py +0 -0
  114. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_invalidation.py +0 -0
  115. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_invalidation_degraded.py +0 -0
  116. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_invalidation_redis.py +0 -0
  117. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_list_item_payload.py +0 -0
  118. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_log_api.py +0 -0
  119. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_log_purge.py +0 -0
  120. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_log_sink.py +0 -0
  121. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_log_sink_loop.py +0 -0
  122. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_log_sink_nul.py +0 -0
  123. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_eager_platform.py +0 -0
  124. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_fence_guard.py +0 -0
  125. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_guard_savepoint.py +0 -0
  126. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_loop_interrupt.py +0 -0
  127. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_publish_scope.py +0 -0
  128. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_retry_policy.py +0 -0
  129. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_swallowed_cancel.py +0 -0
  130. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_thread_loops.py +0 -0
  131. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_outbox_worker_chain.py +0 -0
  132. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_page_clamp.py +0 -0
  133. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_pagination_bounds.py +0 -0
  134. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_quiet_sweep_unrecorded.py +0 -0
  135. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_redis_health.py +0 -0
  136. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_redis_url.py +0 -0
  137. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_routes_override_api.py +0 -0
  138. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_runner_settings.py +0 -0
  139. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_service.py +0 -0
  140. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_settings_env.py +0 -0
  141. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_startup_log_masking.py +0 -0
  142. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_task_progress.py +0 -0
  143. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_task_progress_audit.py +0 -0
  144. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_task_routing.py +0 -0
  145. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_task_status_api.py +0 -0
  146. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_users_ordering.py +0 -0
  147. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_worker_audit.py +0 -0
  148. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_worker_audit_bookkeeping.py +0 -0
  149. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_bg_worker_settings.py +0 -0
  150. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_detail_props.py +0 -0
  151. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_execution_tenancy.py +0 -0
  152. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_index_filters.py +0 -0
  153. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_log_context.py +0 -0
  154. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_outbox_admin.py +0 -0
  155. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_outbox_concurrency.py +0 -0
  156. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_outbox_delivery.py +0 -0
  157. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_outbox_tenancy.py +0 -0
  158. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_outbox_worker_task.py +0 -0
  159. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_retry_failed_bulk.py +0 -0
  160. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_retry_failed_guards.py +0 -0
  161. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_retry_sweep_ordering.py +0 -0
  162. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_signal_tenant_stamp.py +0 -0
  163. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_signals.py +0 -0
  164. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_sweep_stuck.py +0 -0
  165. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_sync_db.py +0 -0
  166. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_sync_db_fork.py +0 -0
  167. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_tenant_context.py +0 -0
  168. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_worker_inspector.py +0 -0
  169. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_worker_tenancy.py +0 -0
  170. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_workers_endpoints.py +0 -0
  171. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests/test_workers_uptime.py +0 -0
  172. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/background_tasks_DetailPage.test.tsx +0 -0
  173. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/background_tasks_IndexPage.test.tsx +0 -0
  174. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/background_tasks_LogsTab.test.tsx +0 -0
  175. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/background_tasks_OutboxPage.test.tsx +0 -0
  176. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/background_tasks_WorkerHealthBanner.test.tsx +0 -0
  177. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/outbox.test.ts +0 -0
  178. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/retry.test.ts +0 -0
  179. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/stub-fetch.ts +0 -0
  180. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tests-js/task-formatters.test.ts +0 -0
  181. {simple_module_background_tasks-0.0.39 → simple_module_background_tasks-0.0.41}/tsconfig.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simple_module_background_tasks
3
- Version: 0.0.39
3
+ Version: 0.0.41
4
4
  Summary: Celery + Redis task queue with admin UI for monitoring and retrying failed/stuck tasks
5
5
  Project-URL: Homepage, https://github.com/antosubash/simple_module_python
6
6
  Project-URL: Repository, https://github.com/antosubash/simple_module_python
@@ -23,10 +23,10 @@ Classifier: Typing :: Typed
23
23
  Requires-Python: >=3.12
24
24
  Requires-Dist: celery[redis]<6,>=5.4
25
25
  Requires-Dist: redis<7,>=5
26
- Requires-Dist: simple-module-core==0.0.39
27
- Requires-Dist: simple-module-db==0.0.39
28
- Requires-Dist: simple-module-hosting==0.0.39
29
- Requires-Dist: simple-module-settings==0.0.39
26
+ Requires-Dist: simple-module-core==0.0.41
27
+ Requires-Dist: simple-module-db==0.0.41
28
+ Requires-Dist: simple-module-hosting==0.0.41
29
+ Requires-Dist: simple-module-settings==0.0.41
30
30
  Description-Content-Type: text/markdown
31
31
 
32
32
  # simple_module_background_tasks
@@ -22,6 +22,8 @@ from __future__ import annotations
22
22
  from datetime import UTC, datetime
23
23
  from typing import Any
24
24
 
25
+ from simple_module_core.datetimes import aware as _aware
26
+ from simple_module_core.datetimes import utcnow
25
27
  from sqlalchemy import func, select
26
28
  from sqlalchemy.orm import Session
27
29
 
@@ -30,10 +32,6 @@ def _is_postgres(session: Any) -> bool:
30
32
  return session.get_bind().dialect.name == "postgresql"
31
33
 
32
34
 
33
- def _aware(value: datetime) -> datetime:
34
- return value if value.tzinfo is not None else value.replace(tzinfo=UTC)
35
-
36
-
37
35
  async def db_now(session: Any) -> datetime:
38
36
  """The database's current time, as an aware UTC ``datetime``.
39
37
 
@@ -41,7 +39,7 @@ async def db_now(session: Any) -> datetime:
41
39
  hold either).
42
40
  """
43
41
  if not _is_postgres(session):
44
- return datetime.now(UTC)
42
+ return utcnow()
45
43
  stmt = select(func.clock_timestamp())
46
44
  if isinstance(session, Session):
47
45
  value = session.execute(stmt).scalar_one()
@@ -132,6 +132,8 @@ class OutboxTransport(_OutboxWriter):
132
132
  # Eager in-process deliveries still running (kept so they aren't
133
133
  # garbage-collected mid-flight, and so ``drain`` can await them).
134
134
  self._tasks: set[asyncio.Task[Any]] = set()
135
+ # Chained eager publishes must not share a StaticPool transaction (#655).
136
+ self._dispatch_lock = asyncio.Lock()
135
137
 
136
138
  def policy(self) -> OutboxPolicy:
137
139
  s = self._services.settings
@@ -155,8 +157,9 @@ class OutboxTransport(_OutboxWriter):
155
157
  id_strs = [str(i) for i in id_list]
156
158
  after_commit(db, [lambda: self._send(id_strs)])
157
159
 
158
- def _dispatch(self, ids: list[uuid.UUID]) -> Any:
159
- return dispatch(self._db_state.session_factory, self._bus, self.policy(), ids=ids)
160
+ async def _dispatch(self, ids: list[uuid.UUID]) -> Any:
161
+ async with self._dispatch_lock:
162
+ return await dispatch(self._db_state.session_factory, self._bus, self.policy(), ids=ids)
160
163
 
161
164
  def _dispatch_soon(self, ids: list[uuid.UUID]) -> None:
162
165
  """Eager delivery from a session's ``after_commit`` event.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-module-py/background-tasks",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "private": true,
5
5
  "description": "Frontend assets for the BackgroundTasks module",
6
6
  "peerDependencies": {
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_background_tasks"
3
- version = "0.0.39"
3
+ version = "0.0.41"
4
4
  description = "Celery + Redis task queue with admin UI for monitoring and retrying failed/stuck tasks"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -21,10 +21,10 @@ classifiers = [
21
21
  "Typing :: Typed",
22
22
  ]
23
23
  dependencies = [
24
- "simple_module_core==0.0.39",
25
- "simple_module_db==0.0.39",
26
- "simple_module_hosting==0.0.39",
27
- "simple_module_settings==0.0.39",
24
+ "simple_module_core==0.0.41",
25
+ "simple_module_db==0.0.41",
26
+ "simple_module_hosting==0.0.41",
27
+ "simple_module_settings==0.0.41",
28
28
  "celery[redis]>=5.4,<6",
29
29
  "redis>=5,<7",
30
30
  ]
@@ -0,0 +1,55 @@
1
+ """Chained eager deliveries must not overlap on in-memory SQLite (#655)."""
2
+
3
+ import asyncio
4
+ from dataclasses import dataclass
5
+
6
+ from background_tasks.constants import OutboxStatus
7
+ from background_tasks.models import TaskExecution
8
+ from simple_module_core import DurableContext
9
+ from simple_module_core.events import Event
10
+
11
+
12
+ @dataclass
13
+ class EagerParent(Event):
14
+ pass
15
+
16
+
17
+ @dataclass
18
+ class EagerChild(Event):
19
+ pass
20
+
21
+
22
+ async def test_chained_eager_delivery_waits_for_parent_dispatch(app, outbox_rows, effect_names):
23
+ app.state.background_tasks.settings.task_always_eager = True
24
+ bus = app.state.sm.event_bus
25
+ active = False
26
+
27
+ async def publish_child(event: EagerParent, ctx: DurableContext) -> None:
28
+ await bus.publish_durable(EagerChild(), ctx.db)
29
+
30
+ async def effect(event: Event, ctx: DurableContext) -> None:
31
+ nonlocal active
32
+ assert not active, "eager dispatchers overlapped"
33
+ active = True
34
+ try:
35
+ await ctx.db.connection()
36
+ await asyncio.sleep(0.05) # intentional-sleep: child dispatcher claims while guarded
37
+ ctx.db.add(TaskExecution(task_name=f"effect:{type(event).__name__}"))
38
+ await ctx.db.flush()
39
+ finally:
40
+ active = False
41
+
42
+ bus.subscribe_durable(EagerParent, publish_child, name="eager-publish-child")
43
+ bus.subscribe_durable(EagerParent, effect, name="eager-parent-effect")
44
+ bus.subscribe_durable(EagerChild, effect, name="eager-child-effect")
45
+ async with app.state.sm.db.session_factory() as db:
46
+ await bus.publish_durable(EagerParent(), db)
47
+ await db.commit()
48
+
49
+ await bus.durable_transport.drain()
50
+
51
+ rows = await outbox_rows()
52
+ assert len(rows) == 3
53
+ assert all(row.status == OutboxStatus.DELIVERED for row in rows)
54
+ assert all(row.attempts == 1 for row in rows)
55
+ assert await effect_names() == ["effect:EagerChild", "effect:EagerParent"]