DefStream 0.1.18__tar.gz → 0.1.20__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.
- {defstream-0.1.18 → defstream-0.1.20}/DefStream.egg-info/PKG-INFO +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/DefStream.egg-info/SOURCES.txt +29 -5
- {defstream-0.1.18 → defstream-0.1.20}/PKG-INFO +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/docs/Contracts.en.md +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/docs/Contracts.md +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/docs/Operations.en.md +34 -21
- {defstream-0.1.18 → defstream-0.1.20}/docs/Operations.md +34 -21
- {defstream-0.1.18 → defstream-0.1.20}/docs/RabbitMQ.en.md +51 -6
- {defstream-0.1.18 → defstream-0.1.20}/docs/RabbitMQ.md +50 -6
- {defstream-0.1.18 → defstream-0.1.20}/docs/Redis.en.md +13 -7
- {defstream-0.1.18 → defstream-0.1.20}/docs/Redis.md +11 -6
- {defstream-0.1.18 → defstream-0.1.20}/docs/Tasks.en.md +2 -2
- {defstream-0.1.18 → defstream-0.1.20}/docs/Tasks.md +3 -2
- defstream-0.1.20/issues/feature/47/CHANGELOG.md +25 -0
- defstream-0.1.20/issues/feature/47/IMPLEMENTS.md +22 -0
- defstream-0.1.20/issues/feature/47/PLAN.md +27 -0
- defstream-0.1.20/issues/feature/47/README.md +72 -0
- defstream-0.1.20/issues/feature/47/REQUIREMENTS.md +101 -0
- defstream-0.1.20/issues/feature/47/TASKS.md +17 -0
- defstream-0.1.20/issues/feature/47/implements/1793271568985.md +10 -0
- defstream-0.1.20/issues/feature/47/implements/1793272077065.md +10 -0
- defstream-0.1.20/issues/feature/47/tasks/1793271236067.md +9 -0
- defstream-0.1.20/issues/feature/47/tasks/1793271384432.md +8 -0
- defstream-0.1.20/issues/feature/47/tasks/1793271506089.md +8 -0
- defstream-0.1.20/issues/feature/47/tasks/1793271819682.md +35 -0
- defstream-0.1.20/issues/feature/47/tasks/1793272077066.md +14 -0
- defstream-0.1.20/issues/fix/43/CHANGELOG.md +5 -0
- defstream-0.1.20/issues/fix/43/IMPLEMENTS.md +16 -0
- defstream-0.1.20/issues/fix/43/PLAN.md +67 -0
- defstream-0.1.20/issues/fix/43/README.md +35 -0
- defstream-0.1.20/issues/fix/43/REQUIREMENTS.md +59 -0
- defstream-0.1.20/issues/fix/43/TASKS.md +3 -0
- defstream-0.1.20/issues/fix/43/implements/1793260818660.md +7 -0
- defstream-0.1.20/issues/fix/43/implements/1793261447018.md +7 -0
- defstream-0.1.20/issues/fix/43/tasks/1793260818661.md +14 -0
- defstream-0.1.20/issues/fix/43/tasks/1793261447019.md +7 -0
- defstream-0.1.20/issues/fix/43/tasks/1793262314955.md +7 -0
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/RabbitMQ/Sample.RPC.py +6 -3
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/RabbitMQ/Sample.Stream.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/RabbitMQ/Sample.py +11 -7
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/Redis/Sample.Stream.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/Redis/Sample.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/samples/Broker/Sample.py +6 -3
- {defstream-0.1.18 → defstream-0.1.20}/samples/Worker/RabbitMQ/Tasks.py +6 -2
- {defstream-0.1.18 → defstream-0.1.20}/samples/Worker/RabbitMQ/Worker.py +3 -3
- {defstream-0.1.18 → defstream-0.1.20}/samples/Worker/Redis/Sample.py +6 -4
- {defstream-0.1.18 → defstream-0.1.20}/samples/Worker/Sample.py +4 -3
- {defstream-0.1.18 → defstream-0.1.20}/setup.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Configuration.py +1 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Consumer.py +3 -3
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Event.py +2 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Connection.py +4 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Consumer.py +7 -5
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Event.py +20 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Exchange.py +1 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Queue.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Stream.py +3 -3
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Subscription.py +17 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/__init__.py +2 -4
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Connection.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Consumer.py +8 -4
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Event.py +23 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Queue.py +4 -4
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Subscription.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/__init__.py +6 -6
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Protocol.py +2 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/__init__.py +2 -8
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/Metrics.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/Ping.py +1 -1
- defstream-0.1.18/src/Inspector/Extensions/Console.html → defstream-0.1.20/src/Inspector/Extensions/Play.html +4 -4
- defstream-0.1.18/src/Inspector/Extensions/Console.py → defstream-0.1.20/src/Inspector/Extensions/Play.py +29 -29
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/Specifications.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/Status.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/__init__.py +2 -2
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Inspector.py +12 -5
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/DataObject.py +18 -10
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Object.py +18 -10
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/String.py +8 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Type.py +56 -51
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Executor.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Pool.py +3 -3
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Run.py +5 -5
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Worker.py +1 -1
- defstream-0.1.20/tests/_support.py +48 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_broker_packaging.py +29 -2
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_inspector.py +63 -36
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_inspector_logging.py +39 -19
- defstream-0.1.18/tests/test_inspector_console.py → defstream-0.1.20/tests/test_inspector_play.py +65 -52
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_lifecycle_hooks.py +25 -14
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_logging.py +31 -23
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_protocol_contracts.py +44 -28
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_integration.py +8 -7
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_logging.py +12 -6
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_rpc.py +11 -8
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_rpc_integration.py +4 -3
- defstream-0.1.20/tests/test_rabbitmq_timeouts.py +278 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_worker.py +5 -2
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_redis.py +8 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_redis_integration.py +12 -9
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_redis_logging.py +30 -7
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_runner_hooks.py +1 -1
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_specifications.py +59 -34
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_task_messages.py +22 -12
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_validator_patterns.py +15 -1
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_worker.py +18 -12
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_worker_startup.py +18 -11
- defstream-0.1.18/src/Broker/Implements/RabbitMQ/Policies.py +0 -9
- defstream-0.1.18/src/Broker/Policies.py +0 -25
- {defstream-0.1.18 → defstream-0.1.20}/.github/ISSUE_TEMPLATE/01.feature.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/ISSUE_TEMPLATE/02.bug.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/ISSUE_TEMPLATE/03.fix.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/ISSUE_TEMPLATE/04.task.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.github/workflows/ci.yml +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/.gitignore +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/DefStream.egg-info/dependency_links.txt +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/DefStream.egg-info/requires.txt +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/DefStream.egg-info/top_level.txt +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/LICENSE +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/README.en.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/README.setup.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/GettingStarted.en.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/GettingStarted.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/LifecycleHooks.en.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/LifecycleHooks.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/README.en.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/docs/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/instructions/CODE.instructions.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/instructions/DOCS.instructions.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/instructions/README.instructions.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/bug/16/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/bug/16/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/bug/16/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/bug/16/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/1/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/1/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/1/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/1/TASK.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/1/ci.refs.json +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/8/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/8/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/8/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/feature/8/ci.refs.json +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/10/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/10/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/10/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/13/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/21/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/21/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/21/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/21/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/24/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/24/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/24/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/24/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/25/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/25/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/25/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/25/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/25/TASK.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/26/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/26/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/26/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/26/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/29/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/29/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/29/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/29/TASK.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/3/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/3/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/3/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/3/ci.refs.json +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/CHANGELOG.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/PLAN.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/TASKS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/implements/1793257519898.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/implements/1793257826069.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/tasks/1793256929057.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/tasks/1793256990072.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/tasks/1793257216492.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/tasks/1793257519899.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/41/tasks/1793257826068.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/6/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/6/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/fix/6/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/18/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/18/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/18/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/ISSUE.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/PLAN.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/32/TASK.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/34/CHANGELOG.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/34/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/34/PLAN.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/34/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/34/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/36/CHANGELOG.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/36/IMPLEMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/36/PLAN.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/36/README.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/issues/task/36/REQUIREMENTS.md +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/samples/Worker/RabbitMQ/Client.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/setup.cfg +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Connection.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Errors.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Configuration.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/RabbitMQ/Serializer.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Configuration.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/Redis/Serializer.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Implements/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Broker/Priority.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Descriptor/DataObject.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Descriptor/Types.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Descriptor/Value.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Descriptor/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extension.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Extensions/Status.html +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/Response.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Inspector/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Pattern.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Array.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Common.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Compare.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Condition.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/DateTime.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Number.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/Size.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Patterns/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Validate.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/Validator.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Validator/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Message.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Specification.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/Startup.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/Worker/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/src/__init__.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_descriptor.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_pool_callbacks.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_process_signals.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_broker_methods.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_rabbitmq_priorities.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_status.py +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_status_ui.cjs +0 -0
- {defstream-0.1.18 → defstream-0.1.20}/tests/test_task_priorities.py +0 -0
|
@@ -44,6 +44,19 @@ issues/feature/1/README.md
|
|
|
44
44
|
issues/feature/1/REQUIREMENTS.md
|
|
45
45
|
issues/feature/1/TASK.md
|
|
46
46
|
issues/feature/1/ci.refs.json
|
|
47
|
+
issues/feature/47/CHANGELOG.md
|
|
48
|
+
issues/feature/47/IMPLEMENTS.md
|
|
49
|
+
issues/feature/47/PLAN.md
|
|
50
|
+
issues/feature/47/README.md
|
|
51
|
+
issues/feature/47/REQUIREMENTS.md
|
|
52
|
+
issues/feature/47/TASKS.md
|
|
53
|
+
issues/feature/47/implements/1793271568985.md
|
|
54
|
+
issues/feature/47/implements/1793272077065.md
|
|
55
|
+
issues/feature/47/tasks/1793271236067.md
|
|
56
|
+
issues/feature/47/tasks/1793271384432.md
|
|
57
|
+
issues/feature/47/tasks/1793271506089.md
|
|
58
|
+
issues/feature/47/tasks/1793271819682.md
|
|
59
|
+
issues/feature/47/tasks/1793272077066.md
|
|
47
60
|
issues/feature/8/IMPLEMENTS.md
|
|
48
61
|
issues/feature/8/README.md
|
|
49
62
|
issues/feature/8/REQUIREMENTS.md
|
|
@@ -90,6 +103,17 @@ issues/fix/41/tasks/1793256990072.md
|
|
|
90
103
|
issues/fix/41/tasks/1793257216492.md
|
|
91
104
|
issues/fix/41/tasks/1793257519899.md
|
|
92
105
|
issues/fix/41/tasks/1793257826068.md
|
|
106
|
+
issues/fix/43/CHANGELOG.md
|
|
107
|
+
issues/fix/43/IMPLEMENTS.md
|
|
108
|
+
issues/fix/43/PLAN.md
|
|
109
|
+
issues/fix/43/README.md
|
|
110
|
+
issues/fix/43/REQUIREMENTS.md
|
|
111
|
+
issues/fix/43/TASKS.md
|
|
112
|
+
issues/fix/43/implements/1793260818660.md
|
|
113
|
+
issues/fix/43/implements/1793261447018.md
|
|
114
|
+
issues/fix/43/tasks/1793260818661.md
|
|
115
|
+
issues/fix/43/tasks/1793261447019.md
|
|
116
|
+
issues/fix/43/tasks/1793262314955.md
|
|
93
117
|
issues/fix/6/IMPLEMENTS.md
|
|
94
118
|
issues/fix/6/README.md
|
|
95
119
|
issues/fix/6/REQUIREMENTS.md
|
|
@@ -129,7 +153,6 @@ src/Broker/Connection.py
|
|
|
129
153
|
src/Broker/Consumer.py
|
|
130
154
|
src/Broker/Errors.py
|
|
131
155
|
src/Broker/Event.py
|
|
132
|
-
src/Broker/Policies.py
|
|
133
156
|
src/Broker/Priority.py
|
|
134
157
|
src/Broker/Protocol.py
|
|
135
158
|
src/Broker/__init__.py
|
|
@@ -139,7 +162,6 @@ src/Broker/Implements/RabbitMQ/Connection.py
|
|
|
139
162
|
src/Broker/Implements/RabbitMQ/Consumer.py
|
|
140
163
|
src/Broker/Implements/RabbitMQ/Event.py
|
|
141
164
|
src/Broker/Implements/RabbitMQ/Exchange.py
|
|
142
|
-
src/Broker/Implements/RabbitMQ/Policies.py
|
|
143
165
|
src/Broker/Implements/RabbitMQ/Queue.py
|
|
144
166
|
src/Broker/Implements/RabbitMQ/Serializer.py
|
|
145
167
|
src/Broker/Implements/RabbitMQ/Stream.py
|
|
@@ -161,10 +183,10 @@ src/Inspector/Extension.py
|
|
|
161
183
|
src/Inspector/Inspector.py
|
|
162
184
|
src/Inspector/Response.py
|
|
163
185
|
src/Inspector/__init__.py
|
|
164
|
-
src/Inspector/Extensions/Console.html
|
|
165
|
-
src/Inspector/Extensions/Console.py
|
|
166
186
|
src/Inspector/Extensions/Metrics.py
|
|
167
187
|
src/Inspector/Extensions/Ping.py
|
|
188
|
+
src/Inspector/Extensions/Play.html
|
|
189
|
+
src/Inspector/Extensions/Play.py
|
|
168
190
|
src/Inspector/Extensions/Specifications.py
|
|
169
191
|
src/Inspector/Extensions/Status.html
|
|
170
192
|
src/Inspector/Extensions/Status.py
|
|
@@ -193,11 +215,12 @@ src/Worker/Specification.py
|
|
|
193
215
|
src/Worker/Startup.py
|
|
194
216
|
src/Worker/Worker.py
|
|
195
217
|
src/Worker/__init__.py
|
|
218
|
+
tests/_support.py
|
|
196
219
|
tests/test_broker_packaging.py
|
|
197
220
|
tests/test_descriptor.py
|
|
198
221
|
tests/test_inspector.py
|
|
199
|
-
tests/test_inspector_console.py
|
|
200
222
|
tests/test_inspector_logging.py
|
|
223
|
+
tests/test_inspector_play.py
|
|
201
224
|
tests/test_lifecycle_hooks.py
|
|
202
225
|
tests/test_logging.py
|
|
203
226
|
tests/test_pool_callbacks.py
|
|
@@ -209,6 +232,7 @@ tests/test_rabbitmq_logging.py
|
|
|
209
232
|
tests/test_rabbitmq_priorities.py
|
|
210
233
|
tests/test_rabbitmq_rpc.py
|
|
211
234
|
tests/test_rabbitmq_rpc_integration.py
|
|
235
|
+
tests/test_rabbitmq_timeouts.py
|
|
212
236
|
tests/test_rabbitmq_worker.py
|
|
213
237
|
tests/test_redis.py
|
|
214
238
|
tests/test_redis_integration.py
|
|
@@ -171,5 +171,5 @@ Validation exceptions are task failures and follow error hooks and the `on_error
|
|
|
171
171
|
policy. The example's `Reject()` avoids endlessly retrying invalid inputs.
|
|
172
172
|
To preserve failures in a DLQ, also configure `Subscription(error=...)` and
|
|
173
173
|
provision it through `declare()`. Schemas and examples appear in Inspector's
|
|
174
|
-
AsyncAPI and
|
|
174
|
+
AsyncAPI and Play; custom Validator patterns are not automatically
|
|
175
175
|
reverse-engineered into JSON Schema.
|
|
@@ -146,7 +146,7 @@ class Add(
|
|
|
146
146
|
검증 예외는 작업 실패로 처리되어 오류 훅과 `on_error` 정책을 따릅니다.
|
|
147
147
|
예제의 `Reject()`는 잘못된 입력을 무한 재시도하지 않게 합니다. DLQ에 보관하려면
|
|
148
148
|
`Subscription(error=...)`도 지정하고 `declare()`로 해당 큐를 준비하세요.
|
|
149
|
-
스키마·예제는 Inspector의 AsyncAPI와
|
|
149
|
+
스키마·예제는 Inspector의 AsyncAPI와 Play에 표시되며,
|
|
150
150
|
사용자 정의 Validator 패턴을 자동으로 JSON Schema로 역변환하지는 않습니다.
|
|
151
151
|
|
|
152
152
|
```mermaid
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Inspector tools, logging, and broker selection.
|
|
6
6
|
|
|
7
|
-
## Health checks and
|
|
7
|
+
## Health checks and Play
|
|
8
8
|
|
|
9
9
|
Inspector is optional and uses a Python standard-library HTTP server.
|
|
10
10
|
Configure it before starting the Worker and pass `Worker(..., inspector=inspector)`.
|
|
@@ -13,7 +13,7 @@ This snippet reuses the `Connection` and `Configuration` imports from `worker.py
|
|
|
13
13
|
```python
|
|
14
14
|
from DefStream.Inspector import Inspector
|
|
15
15
|
from DefStream.Inspector.Extensions import (
|
|
16
|
-
|
|
16
|
+
Play,
|
|
17
17
|
Metrics,
|
|
18
18
|
Ping,
|
|
19
19
|
Specifications,
|
|
@@ -38,8 +38,8 @@ inspector = Inspector(
|
|
|
38
38
|
Metrics('/metrics'),
|
|
39
39
|
Status('/status'),
|
|
40
40
|
Specifications('/asyncapi.json'),
|
|
41
|
-
|
|
42
|
-
'/
|
|
41
|
+
Play(
|
|
42
|
+
'/play',
|
|
43
43
|
broker=create_connection,
|
|
44
44
|
title='DefStream',
|
|
45
45
|
),
|
|
@@ -53,7 +53,7 @@ inspector = Inspector(
|
|
|
53
53
|
| `/metrics` | Prometheus metrics with the `defstream_` prefix |
|
|
54
54
|
| `/status` | Successes, failures, throughput, and duration; register with exactly one `Metrics` |
|
|
55
55
|
| `/asyncapi.json` | Registered task request/reply contracts as AsyncAPI JSON |
|
|
56
|
-
| `/
|
|
56
|
+
| `/play` | Browse tasks and schemas, send JSON messages, and execute RPC on supported brokers |
|
|
57
57
|
|
|
58
58
|
There are no default routes. Metrics describe one Worker and reset on restart.
|
|
59
59
|
Execution counts include retries and hooks, not unique messages or ACKs.
|
|
@@ -67,22 +67,26 @@ flowchart LR
|
|
|
67
67
|
I --> M[Prometheus metrics]
|
|
68
68
|
I --> S[Status endpoint]
|
|
69
69
|
I --> A[AsyncAPI document]
|
|
70
|
-
I --> C[
|
|
70
|
+
I --> C[Play task execution]
|
|
71
71
|
C --> F[BrokerFactory]
|
|
72
72
|
F --> B[New broker connection per use]
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
The `Console` extension has been renamed to `Play`. Update existing imports and
|
|
76
|
+
class usages to `Play`. The example above uses `/play`, but you can keep your
|
|
77
|
+
configured URL path. The extension logger is now `Worker.Inspector.Play`.
|
|
78
|
+
|
|
79
|
+
**Restrict access.** The Play example above publishes real tasks without
|
|
76
80
|
authentication. For authentication, pass a random token of at least 16 characters
|
|
77
|
-
using `
|
|
81
|
+
using `Play(token=...)` and enter it in the browser. Load the token from an
|
|
78
82
|
environment variable or secret store. Other built-in endpoints remain
|
|
79
83
|
unauthenticated: bind to loopback or a trusted management network, and use an
|
|
80
84
|
HTTPS reverse proxy with additional access control for remote access.
|
|
81
85
|
Inspector has no built-in TLS and is not a public web server.
|
|
82
|
-
|
|
86
|
+
Play's connection factory must return a new connection on every call,
|
|
83
87
|
never the Worker's connection.
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
Play's `broker` parameter uses the `DefStream.Broker.BrokerFactory` contract.
|
|
86
90
|
Its `__call__() -> Connection` takes no arguments and returns a new connection.
|
|
87
91
|
Functions such as `create_connection` above and lambdas remain valid without changes.
|
|
88
92
|
For a class-based factory, you can inherit `BrokerFactory` and implement `__call__`.
|
|
@@ -92,14 +96,19 @@ For a class-based factory, you can inherit `BrokerFactory` and implement `__call
|
|
|
92
96
|
|
|
93
97
|
DefStream records messages through standard `logging` without configuring handlers,
|
|
94
98
|
formatters, or levels. Select the sources your application needs. The samples
|
|
95
|
-
output only the `Sample` and `
|
|
99
|
+
output only the `Sample`, `Worker`, `Task`, and `Broker` logger hierarchies, replacing their
|
|
96
100
|
`print()` calls with logging. The Worker's existing startup banner is still
|
|
97
101
|
printed regardless of logging configuration.
|
|
98
102
|
|
|
99
103
|
```python
|
|
100
104
|
from logging import DEBUG, Filter, Formatter, StreamHandler, getLogger
|
|
101
105
|
|
|
102
|
-
sources = (
|
|
106
|
+
sources = (
|
|
107
|
+
Filter('Sample'),
|
|
108
|
+
Filter('Worker'),
|
|
109
|
+
Filter('Task'),
|
|
110
|
+
Filter('Broker'),
|
|
111
|
+
)
|
|
103
112
|
handler = StreamHandler()
|
|
104
113
|
handler.setFormatter(Formatter(
|
|
105
114
|
'%(asctime)s %(processName)s %(name)s %(levelname)s %(message)s'
|
|
@@ -113,24 +122,28 @@ logger = getLogger('Sample')
|
|
|
113
122
|
logger.info('Application started')
|
|
114
123
|
```
|
|
115
124
|
|
|
116
|
-
Apply filters to the **handler**, not the root logger. `Filter('
|
|
117
|
-
includes `
|
|
125
|
+
Apply filters to the **handler**, not the root logger. `Filter('Worker')`
|
|
126
|
+
includes `Worker` and names below `Worker.`, but not `WorkerExtra`.
|
|
127
|
+
Broker loggers use the separate `Broker` hierarchy and are not included by a
|
|
128
|
+
`Worker` filter.
|
|
118
129
|
This configuration is an example for a standalone application; it does not change
|
|
119
130
|
output from other handlers already installed. To receive only broker logs, select
|
|
120
|
-
`
|
|
121
|
-
instead of `DefStream`.
|
|
131
|
+
`Broker.RabbitMQ` or `Broker.Redis`.
|
|
122
132
|
|
|
123
|
-
- The
|
|
124
|
-
`
|
|
125
|
-
`DefStream.ProcessPool`.
|
|
133
|
+
- The `Worker` and `Run` loggers use `Worker` and `Task`, respectively.
|
|
134
|
+
`Executor`, `Pool`, `ThreadPool`, and `ProcessPool` use the `Worker` hierarchy.
|
|
126
135
|
- Shared Pool methods also use the concrete pool's logger member. User subclasses
|
|
127
136
|
inherit the default name and can explicitly override `logger`.
|
|
128
|
-
- Inspector, Server, and RequestHandler share `
|
|
137
|
+
- Inspector, Server, and RequestHandler share `Worker.Inspector`.
|
|
129
138
|
HTTP request receipt is DEBUG; response status and transmission results are INFO.
|
|
130
|
-
Extension-specific logs use `
|
|
139
|
+
Extension-specific logs use `Worker.Inspector.<extension name>`.
|
|
131
140
|
- Normal per-message processing is DEBUG, lifecycle events are INFO, events
|
|
132
141
|
requiring attention are WARNING, and processing failures are ERROR.
|
|
133
142
|
Bodies, results, and credentials are excluded from the default log context.
|
|
143
|
+
- RabbitMQ and Redis broker loggers use the `Broker.RabbitMQ` and `Broker.Redis`
|
|
144
|
+
hierarchies. Update filters and handlers that use the former `DefStream.Broker...` names.
|
|
145
|
+
- Worker logs use the `Worker` and `Task` hierarchies, while Inspector logs use
|
|
146
|
+
`Worker.Inspector`. Update filters and handlers configured with former `DefStream.*` names.
|
|
134
147
|
- Without any handlers, Python's `lastResort` may write WARNING and higher to
|
|
135
148
|
stderr. Do not put sensitive values in user exception messages: failure
|
|
136
149
|
tracebacks include those messages.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Inspector, 로깅 및 브로커 선택 시 고려사항입니다.
|
|
6
6
|
|
|
7
|
-
## 상태 확인과
|
|
7
|
+
## 상태 확인과 Play
|
|
8
8
|
|
|
9
9
|
선택 기능인 Inspector는 Python 표준 라이브러리 HTTP 서버를 사용합니다.
|
|
10
10
|
다음 코드를 Worker 실행 전에 구성하고 `Worker(..., inspector=inspector)`로 전달하세요.
|
|
@@ -13,7 +13,7 @@ Inspector, 로깅 및 브로커 선택 시 고려사항입니다.
|
|
|
13
13
|
```python
|
|
14
14
|
from DefStream.Inspector import Inspector
|
|
15
15
|
from DefStream.Inspector.Extensions import (
|
|
16
|
-
|
|
16
|
+
Play,
|
|
17
17
|
Metrics,
|
|
18
18
|
Ping,
|
|
19
19
|
Specifications,
|
|
@@ -38,8 +38,8 @@ inspector = Inspector(
|
|
|
38
38
|
Metrics('/metrics'),
|
|
39
39
|
Status('/status'),
|
|
40
40
|
Specifications('/asyncapi.json'),
|
|
41
|
-
|
|
42
|
-
'/
|
|
41
|
+
Play(
|
|
42
|
+
'/play',
|
|
43
43
|
broker=create_connection,
|
|
44
44
|
title='DefStream',
|
|
45
45
|
),
|
|
@@ -53,7 +53,7 @@ inspector = Inspector(
|
|
|
53
53
|
| `/metrics` | `defstream_` 접두사의 Prometheus 지표 |
|
|
54
54
|
| `/status` | 처리 성공·실패·처리량·소요 시간. `Metrics` 하나와 함께 등록 |
|
|
55
55
|
| `/asyncapi.json` | 등록 작업의 요청·응답 계약을 AsyncAPI JSON으로 제공 |
|
|
56
|
-
| `/
|
|
56
|
+
| `/play` | 작업 목록·스키마 조회, JSON 메시지 발행, 지원 브로커의 RPC 실행 |
|
|
57
57
|
|
|
58
58
|
기본으로 등록되는 경로는 없습니다. 지표는 한 Worker 기준이며 재시작 시 초기화됩니다.
|
|
59
59
|
처리 횟수는 재시도와 훅을 포함한 실행 시도 기준이지 고유 메시지 수나 ACK 수가 아닙니다.
|
|
@@ -67,20 +67,24 @@ flowchart LR
|
|
|
67
67
|
I --> M[Prometheus 지표]
|
|
68
68
|
I --> S[상태 경로]
|
|
69
69
|
I --> A[AsyncAPI 문서]
|
|
70
|
-
I --> C[작업
|
|
70
|
+
I --> C[Play 작업 실행]
|
|
71
71
|
C --> F[BrokerFactory]
|
|
72
72
|
F --> B[사용할 때마다 새 브로커 연결]
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
`Console` 확장은 `Play`로 이름이 변경되었습니다. 기존 import와 클래스 사용을
|
|
76
|
+
`Play`로 변경하세요. 위 예제는 `/play`를 사용하지만 직접 지정한 URL 경로는 유지할 수 있습니다.
|
|
77
|
+
확장 로거 이름은 `Worker.Inspector.Play`입니다.
|
|
78
|
+
|
|
79
|
+
**접근을 제한하세요.** 위 Play 예제는 인증 없이 실제 작업을 발행합니다.
|
|
80
|
+
인증이 필요하면 `Play`에 `token=`으로 무작위 16자 이상 토큰을 전달하고,
|
|
77
81
|
브라우저에서 입력하세요. 토큰은 환경변수나 비밀 저장소에서 읽으세요.
|
|
78
82
|
다른 기본 엔드포인트는 인증되지 않으므로 신뢰할 수 있는 관리망이나 루프백에만 바인딩하고,
|
|
79
83
|
원격 접근은 HTTPS 역방향 프록시 및 별도 접근 제어를 사용하세요.
|
|
80
84
|
Inspector 자체는 TLS를 제공하지 않으며 공개 웹 서버가 아닙니다.
|
|
81
|
-
|
|
85
|
+
Play의 연결 팩터리는 호출마다 새 연결을 반환해야 하고 Worker 연결을 공유하면 안 됩니다.
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
Play의 `broker` 인자는 `DefStream.Broker.BrokerFactory` 계약을 사용합니다.
|
|
84
88
|
이 계약의 `__call__() -> Connection`은 인자 없이 새 연결을 반환합니다.
|
|
85
89
|
위의 `create_connection` 같은 함수나 람다도 그대로 전달할 수 있으며,
|
|
86
90
|
클래스로 구현할 때는 `BrokerFactory`를 상속하고 `__call__`을 구현할 수 있습니다.
|
|
@@ -89,14 +93,19 @@ Console의 `broker` 인자는 `DefStream.Broker.BrokerFactory` 계약을 사용
|
|
|
89
93
|
## 로깅
|
|
90
94
|
|
|
91
95
|
DefStream은 표준 `logging`으로 기록하며 핸들러·포매터·레벨을 설정하지 않습니다.
|
|
92
|
-
애플리케이션에서 필요한 출처만 선택해 출력하세요. 샘플은 `Sample
|
|
93
|
-
이름 및 그 하위 로거만 출력하며, 샘플의 `print()`는 로그로 대체했습니다.
|
|
96
|
+
애플리케이션에서 필요한 출처만 선택해 출력하세요. 샘플은 `Sample`, `Worker`, `Task`,
|
|
97
|
+
`Broker` 이름 및 그 하위 로거만 출력하며, 샘플의 `print()`는 로그로 대체했습니다.
|
|
94
98
|
Worker의 기존 시작 배너는 로깅 설정과 무관하게 그대로 출력됩니다.
|
|
95
99
|
|
|
96
100
|
```python
|
|
97
101
|
from logging import DEBUG, Filter, Formatter, StreamHandler, getLogger
|
|
98
102
|
|
|
99
|
-
sources = (
|
|
103
|
+
sources = (
|
|
104
|
+
Filter('Sample'),
|
|
105
|
+
Filter('Worker'),
|
|
106
|
+
Filter('Task'),
|
|
107
|
+
Filter('Broker'),
|
|
108
|
+
)
|
|
100
109
|
handler = StreamHandler()
|
|
101
110
|
handler.setFormatter(Formatter(
|
|
102
111
|
'%(asctime)s %(processName)s %(name)s %(levelname)s %(message)s'
|
|
@@ -110,21 +119,25 @@ logger = getLogger('Sample')
|
|
|
110
119
|
logger.info('Application started')
|
|
111
120
|
```
|
|
112
121
|
|
|
113
|
-
필터는 루트 로거가 아닌 **핸들러**에 적용합니다. `Filter('
|
|
114
|
-
`
|
|
122
|
+
필터는 루트 로거가 아닌 **핸들러**에 적용합니다. `Filter('Worker')`는
|
|
123
|
+
`Worker`와 `Worker.` 하위 이름을 포함하지만 `WorkerExtra`는 포함하지 않습니다.
|
|
124
|
+
브로커 로그는 `Broker` 계층을 사용하므로 `Worker` 필터에 포함되지 않습니다.
|
|
115
125
|
위 설정은 독립 실행 애플리케이션을 위한 예제이며, 이미 있는 다른 핸들러의 출력은 바꾸지 않습니다.
|
|
116
|
-
브로커만 보고 싶으면 `
|
|
117
|
-
`DefStream.Broker.Implements.Redis`를 선택할 수 있습니다.
|
|
126
|
+
브로커만 보고 싶으면 `Broker.RabbitMQ` 또는 `Broker.Redis`를 선택할 수 있습니다.
|
|
118
127
|
|
|
119
|
-
-
|
|
120
|
-
`
|
|
128
|
+
- `Worker`와 `Run`의 `logger`는 각각 `Worker`와 `Task`를 사용합니다.
|
|
129
|
+
`Executor`, `Pool`, `ThreadPool`, `ProcessPool`의 로거는 `Worker` 계층을 사용합니다.
|
|
121
130
|
- Pool 공통 메서드도 실제 풀의 로거 멤버를 사용합니다. 사용자 하위 클래스는 기본 이름을
|
|
122
131
|
상속하며 원하면 `logger`를 명시적으로 재정의할 수 있습니다.
|
|
123
|
-
- Inspector·Server·RequestHandler는 `
|
|
132
|
+
- Inspector·Server·RequestHandler는 `Worker.Inspector`를 공유합니다.
|
|
124
133
|
HTTP 요청 수신은 DEBUG, 응답 상태와 전송 결과는 INFO입니다.
|
|
125
|
-
확장 고유 로그는 `
|
|
134
|
+
확장 고유 로그는 `Worker.Inspector.<확장 이름>`을 사용합니다.
|
|
126
135
|
- 정상 메시지별 처리 흐름은 DEBUG, 생명주기는 INFO, 주의할 사건은 WARNING,
|
|
127
136
|
처리 실패는 ERROR로 기록합니다. 본문·결과·인증정보는 기본 로그에 포함하지 않습니다.
|
|
137
|
+
- RabbitMQ와 Redis 브로커 로그는 각각 `Broker.RabbitMQ`와 `Broker.Redis` 이름 계층을
|
|
138
|
+
사용합니다. 기존 `DefStream.Broker...` 이름으로 구성한 필터·핸들러는 새 이름에 맞춰야 합니다.
|
|
139
|
+
- Worker 로그는 `Worker` 및 `Task` 계층을, Inspector 로그는 `Worker.Inspector` 계층을
|
|
140
|
+
사용합니다. 기존 `DefStream.*` 이름에 의존한 필터·핸들러를 새 이름에 맞춰 갱신하세요.
|
|
128
141
|
- 핸들러가 전혀 없으면 Python의 `lastResort`에 의해 WARNING 이상이 stderr에 나올 수 있습니다.
|
|
129
142
|
사용자 예외 메시지에는 민감한 값을 넣지 마세요. 실패 traceback에 예외 메시지가 포함됩니다.
|
|
130
143
|
|
|
@@ -47,18 +47,20 @@ discarded when none is configured.
|
|
|
47
47
|
### Logging
|
|
48
48
|
|
|
49
49
|
`Connection`, `Consumer`, `Queue`, `Exchange`, `Stream`, and `Event` expose a class
|
|
50
|
-
member `logger` named `
|
|
50
|
+
member `logger` named `Broker.RabbitMQ.ClassName`; the logger name differs
|
|
51
51
|
from the module path `DefStream.Broker.Implements.RabbitMQ`. Subclasses
|
|
52
52
|
inherit that logger unless they explicitly override it. The library adds no handlers
|
|
53
53
|
(including `NullHandler`), levels, or filters; propagation and `logging.lastResort`
|
|
54
54
|
keep their standard behavior.
|
|
55
|
+
Update filters or handlers configured for the former `DefStream.Broker.RabbitMQ`
|
|
56
|
+
names to use `Broker.RabbitMQ`.
|
|
55
57
|
|
|
56
58
|
The RabbitMQ implementation does not log normal operation at INFO.
|
|
57
59
|
Connection attempts, successful connects and closes, successful queue/exchange/stream
|
|
58
60
|
declaration, deletion, and binding, consumer subscription, channel close, and
|
|
59
61
|
consumption-loop lifecycle events, and per-message/RPC/settlement tracing all use DEBUG,
|
|
60
62
|
so opening and closing a connection per task does not add INFO records.
|
|
61
|
-
Worker start, readiness, and shutdown remain visible at INFO through the `
|
|
63
|
+
Worker start, readiness, and shutdown remain visible at INFO through the `Worker` logger.
|
|
62
64
|
Expected RPC anomalies use WARNING, and internal I/O or codec failures, including
|
|
63
65
|
failed connection and resource operations, use ERROR.
|
|
64
66
|
Payloads, results, headers, credentials, exception text, and tracebacks are omitted.
|
|
@@ -68,9 +70,10 @@ timeout does not cancel delivered work.
|
|
|
68
70
|
|
|
69
71
|
The Python samples configure a root DEBUG console handler only in their main entry
|
|
70
72
|
points. Its filter accepts `Filter('Sample')` **or**
|
|
71
|
-
`Filter('
|
|
73
|
+
`Filter('Broker.RabbitMQ')`, including dotted descendants only;
|
|
72
74
|
Pika and core logs are excluded. Applications configure their own handlers, levels,
|
|
73
|
-
and filters at
|
|
75
|
+
and filters at `Broker`, `Broker.RabbitMQ`, or a class name. Broker loggers are
|
|
76
|
+
outside the `DefStream` hierarchy; use `DefStream` separately for core logs.
|
|
74
77
|
|
|
75
78
|
### Connection configuration
|
|
76
79
|
|
|
@@ -167,11 +170,53 @@ the selected failure policy on error. Omitting `on_error` defaults to `Requeue()
|
|
|
167
170
|
- `max_priority`: maximum priority for a classic task queue; an integer in `1..255` or `None`.
|
|
168
171
|
- `priority`: default message priority; an integer in `0..max_priority` or `None`.
|
|
169
172
|
Setting only this value sets `max_priority` to `255`.
|
|
173
|
+
- `timeout`: per-queue ACK waiting limit; a positive `int` in milliseconds,
|
|
174
|
+
a positive `datetime.timedelta` with whole-millisecond precision, or `None`.
|
|
175
|
+
Omitting it leaves the broker's existing settings in effect.
|
|
170
176
|
|
|
171
177
|
Constructing a `Subscription` or calling `consumer.subs()` does not declare queues.
|
|
172
178
|
Task `declare()` provisions ordinary durable queues and an optional DLQ,
|
|
173
|
-
not stream queues or Exchange bindings.
|
|
174
|
-
|
|
179
|
+
not stream queues or Exchange bindings. Declaration errors caused by incompatible
|
|
180
|
+
queue options propagate; queues are not automatically deleted and recreated.
|
|
181
|
+
|
|
182
|
+
### ACK waiting limits for long-running tasks
|
|
183
|
+
|
|
184
|
+
On RabbitMQ 3.12 or later, setting `Subscription.timeout` makes task `declare()`
|
|
185
|
+
pass `x-consumer-timeout` to the task queue as integer milliseconds, not to the error queue.
|
|
186
|
+
In the preceding Worker example, define this task and replace `worker.add(Add)`
|
|
187
|
+
with `worker.add(LongRunningAdd)`. The existing `Prepare` declares the queue.
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
from datetime import timedelta
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class LongRunningAdd(
|
|
194
|
+
Add,
|
|
195
|
+
parameters=Subscription(
|
|
196
|
+
queue='defstream.example.rabbitmq.long.add',
|
|
197
|
+
error='defstream.example.rabbitmq.long.add.error',
|
|
198
|
+
timeout=timedelta(hours=24),
|
|
199
|
+
),
|
|
200
|
+
):
|
|
201
|
+
pass
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This setting passes `x-consumer-timeout=86400000`.
|
|
205
|
+
Passing integer milliseconds as `timeout=86400000` is equivalent.
|
|
206
|
+
`Subscription.timeout` is normalized to integer milliseconds during construction.
|
|
207
|
+
A Mapping such as `Subscription.parse({'queue': 'tasks', 'timeout': timedelta(hours=24)})`
|
|
208
|
+
is also supported. Omitting the value or passing `None` omits this queue argument.
|
|
209
|
+
|
|
210
|
+
- `bool` and types other than `int` or `timedelta` raise `TypeError`. Zero, negative durations, or
|
|
211
|
+
sub-millisecond precision raise `ValueError`. Values are not silently rounded or truncated.
|
|
212
|
+
- Constructing or subscribing does not apply the setting. Explicit task queue declaration is required.
|
|
213
|
+
- This is not a task execution deadline. ACK after completion, failure policies, and prefetch
|
|
214
|
+
remain unchanged. The RPC response waiting timeout is separate.
|
|
215
|
+
- Changing or recreating existing queues and applying policies are the operator's responsibility.
|
|
216
|
+
|
|
217
|
+
According to the [RabbitMQ ACK timeout guide](https://www.rabbitmq.com/docs/3.13/consumers#acknowledgement-timeout),
|
|
218
|
+
values below one minute are unsupported and values below five minutes are not recommended.
|
|
219
|
+
Checks run approximately once per minute, so do not use this as a precise execution deadline.
|
|
175
220
|
|
|
176
221
|
### Worker task priorities
|
|
177
222
|
|
|
@@ -61,28 +61,31 @@ finally:
|
|
|
61
61
|
|
|
62
62
|
### 로깅
|
|
63
63
|
|
|
64
|
-
여섯 클래스는 `
|
|
64
|
+
여섯 클래스는 `Broker.RabbitMQ.ClassName` 이름의 클래스 멤버
|
|
65
65
|
`logger`를 사용합니다(`Connection`, `Consumer`, `Queue`, `Exchange`, `Stream`, `Event`).
|
|
66
66
|
로거 이름은 모듈 경로(`DefStream.Broker.Implements.RabbitMQ`)와 다릅니다.
|
|
67
67
|
하위 클래스는 같은 로거를 상속하며 필요하면 멤버를 재정의할 수 있습니다.
|
|
68
68
|
라이브러리는 핸들러·`NullHandler`·레벨·필터를 설정하지 않고 루트로 전파합니다.
|
|
69
69
|
미설정 시 표준 `logging.lastResort` 동작을 유지합니다.
|
|
70
|
+
기존 `DefStream.Broker.RabbitMQ` 이름으로 필터나 핸들러를 설정했다면
|
|
71
|
+
`Broker.RabbitMQ`로 갱신하세요.
|
|
70
72
|
|
|
71
73
|
RabbitMQ 구현은 정상 동작을 INFO로 기록하지 않습니다.
|
|
72
74
|
연결 시도·성공·종료, 큐·Exchange·Stream 선언·삭제·바인딩 성공, Consumer의 구독 적용·채널 종료·소비 루프 생명주기,
|
|
73
75
|
메시지·RPC·정산 추적은 모두 DEBUG입니다.
|
|
74
76
|
작업마다 연결을 열고 닫아도 INFO 로그가 늘어나지 않습니다.
|
|
75
|
-
Worker 시작·준비·종료 같은 실행 생명주기는 `
|
|
77
|
+
Worker 시작·준비·종료 같은 실행 생명주기는 `Worker` 로거의 INFO로 확인할 수 있습니다.
|
|
76
78
|
RPC 시간 초과·원격 오류·응답 라우팅 불가는 WARNING, 연결·자원 작업 실패를 포함한 내부 I/O·코덱 오류는 ERROR입니다.
|
|
77
79
|
본문·결과·헤더·인증정보와 예외 문자열·traceback은 기록하지 않으며 예외는 그대로 전파합니다.
|
|
78
80
|
애플리케이션이 같은 예외를 다시 기록하면 중복될 수 있습니다.
|
|
79
81
|
발행 API 반환은 소비자 처리 완료가 아니며, RPC 응답 시간 초과도 전달된 작업을 취소하지 않습니다.
|
|
80
82
|
|
|
81
83
|
`samples/Broker/RabbitMQ/*.py`는 실행 진입점에서만 루트 DEBUG 콘솔 출력을 구성합니다.
|
|
82
|
-
핸들러의 `Filter('Sample')` 또는 `Filter('
|
|
84
|
+
핸들러의 `Filter('Sample')` 또는 `Filter('Broker.RabbitMQ')`
|
|
83
85
|
통과 조건으로 두 이름과 점으로 구분된 하위 로거만 출력하며 Pika·코어 등은 제외합니다.
|
|
84
|
-
|
|
85
|
-
클래스
|
|
86
|
+
브로커 로거는 `DefStream` 계층 밖에 있으므로 다른 애플리케이션에서는 `Broker`,
|
|
87
|
+
`Broker.RabbitMQ` 또는 클래스 이름으로 선택하세요. `DefStream`은 Worker 등
|
|
88
|
+
코어 로거를 선택할 때 사용합니다.
|
|
86
89
|
|
|
87
90
|
### Worker로 작업 처리하기
|
|
88
91
|
|
|
@@ -162,11 +165,52 @@ Worker는 실행과 완료 훅이 끝난 뒤 ACK하고, 실패하면 지정한
|
|
|
162
165
|
- `max_priority`: classic 작업 큐의 최대 우선순위. 정수 `1..255` 또는 `None`.
|
|
163
166
|
- `priority`: 기본 메시지 우선순위. 정수 `0..max_priority` 또는 `None`.
|
|
164
167
|
이 값만 지정하면 `max_priority`는 `255`로 설정됩니다.
|
|
168
|
+
- `timeout`: 큐별 ACK 대기 한도. 밀리초 단위의 양수 `int`, 양수의 정수 밀리초
|
|
169
|
+
정밀도 `datetime.timedelta` 또는 `None`. 생략하면 브로커의 기존 설정을 따릅니다.
|
|
165
170
|
|
|
166
171
|
`Subscription` 객체 생성이나 `consumer.subs()`는 큐를 선언하지 않습니다.
|
|
167
172
|
작업용 `declare()`는 일반 durable 큐와 선택적 DLQ를 준비하며,
|
|
168
173
|
스트림 큐나 Exchange 바인딩을 자동 생성하지 않습니다.
|
|
169
|
-
|
|
174
|
+
선언 옵션이 호환되지 않아 발생한 오류는 전파하며 자동 삭제·재생성하지 않습니다.
|
|
175
|
+
|
|
176
|
+
### 장시간 작업의 ACK 대기 한도
|
|
177
|
+
|
|
178
|
+
RabbitMQ 3.12 이상에서 `Subscription.timeout`을 지정하면 작업용 `declare()`가
|
|
179
|
+
작업 큐에 `x-consumer-timeout`을 정수 밀리초로 전달합니다. 오류 큐에는 적용하지 않습니다.
|
|
180
|
+
앞의 Worker 예제에서 다음 작업을 정의하고 `worker.add(Add)` 대신
|
|
181
|
+
`worker.add(LongRunningAdd)`로 등록하면 기존 `Prepare`가 큐를 선언합니다.
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from datetime import timedelta
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class LongRunningAdd(
|
|
188
|
+
Add,
|
|
189
|
+
parameters=Subscription(
|
|
190
|
+
queue='defstream.example.rabbitmq.long.add',
|
|
191
|
+
error='defstream.example.rabbitmq.long.add.error',
|
|
192
|
+
timeout=timedelta(hours=24),
|
|
193
|
+
),
|
|
194
|
+
):
|
|
195
|
+
pass
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
위 설정은 `x-consumer-timeout=86400000`을 전달합니다.
|
|
199
|
+
`timeout=86400000`처럼 정수 밀리초로 지정해도 같습니다.
|
|
200
|
+
`Subscription.timeout`은 생성 시 정수 밀리초로 정규화됩니다.
|
|
201
|
+
`Subscription.parse({'queue': 'tasks', 'timeout': timedelta(hours=24)})`처럼
|
|
202
|
+
Mapping으로도 지정할 수 있습니다. 생략 또는 `None`이면 해당 큐 인자를 보내지 않습니다.
|
|
203
|
+
|
|
204
|
+
- `bool` 및 `int`·`timedelta` 이외의 타입은 `TypeError`, 0·음수 또는 밀리초 미만 정밀도는
|
|
205
|
+
`ValueError`로 거부합니다. 시간을 조용히 반올림하거나 절삭하지 않습니다.
|
|
206
|
+
- 객체 생성이나 구독만으로 설정을 적용하지 않습니다. 명시적인 작업 큐 선언이 필요합니다.
|
|
207
|
+
- 작업 실행을 강제 중단하는 기능이 아니며 완료 후 ACK·실패 정책·prefetch를 유지합니다.
|
|
208
|
+
RPC 응답 대기시간은 별도입니다.
|
|
209
|
+
- 기존 큐의 설정 변경·재생성·policy 적용은 운영 측 책임입니다.
|
|
210
|
+
|
|
211
|
+
[RabbitMQ의 ACK timeout 안내](https://www.rabbitmq.com/docs/3.13/consumers#acknowledgement-timeout)에
|
|
212
|
+
따르면 1분 미만은 지원하지 않으며 5분 미만은 권장하지 않습니다.
|
|
213
|
+
이 검사는 약 1분 간격이므로 정확한 실행 제한 시간으로 사용하지 마세요.
|
|
170
214
|
|
|
171
215
|
### 워커 작업 우선순위
|
|
172
216
|
|
|
@@ -67,14 +67,16 @@ Read production credentials from environment variables or a secret store.
|
|
|
67
67
|
### Logging
|
|
68
68
|
|
|
69
69
|
`Connection`, `Consumer`, `Queue`, and `Event` each use a class-level logger named
|
|
70
|
-
`
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
`Broker.Redis.<ClassName>`. Records propagate to the parent `Broker` logger and
|
|
71
|
+
the root logger. Update filters or handlers configured for the former
|
|
72
|
+
`DefStream.Broker.Implements.Redis` names to use `Broker.Redis`. The library does
|
|
73
|
+
not configure handlers or logging levels; configure output destinations and filters
|
|
74
|
+
in your application.
|
|
73
75
|
Records exclude message bodies and credentials, and existing exceptions still
|
|
74
76
|
propagate to callers after an error is logged. Since callers may log the same
|
|
75
77
|
failure again, keep traceback logging at the boundary responsible for that failure.
|
|
76
78
|
The examples configure output only at their execution entry points, selecting
|
|
77
|
-
the `Sample` and Redis logger hierarchies at DEBUG level.
|
|
79
|
+
the `Sample` and `Broker.Redis` logger hierarchies at DEBUG level.
|
|
78
80
|
|
|
79
81
|
### Consumer groups and history
|
|
80
82
|
|
|
@@ -111,8 +113,12 @@ This executable example prepares a task stream and group, then consumes tasks.
|
|
|
111
113
|
```python
|
|
112
114
|
from signal import SIGINT, signal
|
|
113
115
|
|
|
114
|
-
from DefStream.Broker.
|
|
115
|
-
|
|
116
|
+
from DefStream.Broker.Implements.Redis import (
|
|
117
|
+
Configuration,
|
|
118
|
+
Connection,
|
|
119
|
+
Reject,
|
|
120
|
+
Subscription,
|
|
121
|
+
)
|
|
116
122
|
from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
|
|
117
123
|
|
|
118
124
|
|
|
@@ -219,7 +225,7 @@ flowchart TD
|
|
|
219
225
|
- `delete_queue()` and `delete_stream()` delete the stream key itself.
|
|
220
226
|
Do not remove shared streams/groups in cleanup code without ownership.
|
|
221
227
|
- Connection, decoding, and handler failures propagate; there is no automatic reconnection.
|
|
222
|
-
- Exchanges and RPC are not supported. Do not use `request()` or
|
|
228
|
+
- Exchanges and RPC are not supported. Do not use `request()` or Play RPC.
|
|
223
229
|
- Redis Cluster is implemented, but current integration tests cover standalone Redis.
|
|
224
230
|
- The Worker's connection and pool belong to one run. `worker.stop()` waits for tasks and closes resources.
|
|
225
231
|
|
|
@@ -66,13 +66,14 @@ Cluster는 Redis Cluster를 사용하며 `database=0`이어야 합니다.
|
|
|
66
66
|
### 로깅
|
|
67
67
|
|
|
68
68
|
`Connection`, `Consumer`, `Queue`, `Event`는 각각
|
|
69
|
-
`
|
|
70
|
-
`DefStream`
|
|
69
|
+
`Broker.Redis.<클래스명>` 로거를 사용하며 상위 `Broker` 로거와 루트 로거로
|
|
70
|
+
전파합니다. 기존 `DefStream.Broker.Implements.Redis` 이름으로 설정한 필터나
|
|
71
|
+
핸들러는 `Broker.Redis`로 갱신하세요. 라이브러리는 핸들러나 로그 수준을
|
|
71
72
|
설정하지 않으므로 애플리케이션에서 필요한 출력 대상과 필터를 구성하세요.
|
|
72
73
|
기록에는 메시지 본문과 인증 정보가 포함되지 않으며, 오류 로그 후에도 기존
|
|
73
74
|
예외는 호출자에게 전파됩니다. 호출자가 같은 실패를 다시 기록할 수 있으므로
|
|
74
75
|
traceback은 담당 경계 한 곳에서만 남기세요. 예제는 실행 진입점에서만 `Sample`
|
|
75
|
-
및 Redis 로거 계층을 DEBUG로 출력하도록 설정합니다.
|
|
76
|
+
및 `Broker.Redis` 로거 계층을 DEBUG로 출력하도록 설정합니다.
|
|
76
77
|
|
|
77
78
|
### 소비자 그룹과 이력
|
|
78
79
|
|
|
@@ -109,8 +110,12 @@ for event in connection.stream('defstream.example.redis').read(
|
|
|
109
110
|
```python
|
|
110
111
|
from signal import SIGINT, signal
|
|
111
112
|
|
|
112
|
-
from DefStream.Broker.
|
|
113
|
-
|
|
113
|
+
from DefStream.Broker.Implements.Redis import (
|
|
114
|
+
Configuration,
|
|
115
|
+
Connection,
|
|
116
|
+
Reject,
|
|
117
|
+
Subscription,
|
|
118
|
+
)
|
|
114
119
|
from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
|
|
115
120
|
|
|
116
121
|
|
|
@@ -215,7 +220,7 @@ flowchart TD
|
|
|
215
220
|
- `delete_queue()`와 `delete_stream()`은 스트림 키 자체를 삭제합니다.
|
|
216
221
|
공유 스트림·그룹을 정리 코드에서 무단 삭제하지 마세요.
|
|
217
222
|
- 연결·디코딩·핸들러 오류는 호출자에게 전파하며 자동 재연결하지 않습니다.
|
|
218
|
-
- Exchange와 RPC는 지원하지 않습니다. `request()`와
|
|
223
|
+
- Exchange와 RPC는 지원하지 않습니다. `request()`와 Play의 RPC를 사용할 수 없습니다.
|
|
219
224
|
- Redis Cluster 구성은 지원하지만 현재 통합 테스트 대상은 standalone Redis입니다.
|
|
220
225
|
- Worker의 연결과 풀은 한 번의 실행 전용입니다. `worker.stop()`은 작업을 기다린 뒤 자원을 닫습니다.
|
|
221
226
|
|