-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trunk enhancements branch #190
Draft
xepozz
wants to merge
75
commits into
master
Choose a base branch
from
new
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…or/hydrator handlers way
# Conflicts: # README.md # config/di.php # config/params.php # src/Middleware/FailureHandling/Implementation/ExponentialDelayMiddleware.php # src/Middleware/FailureHandling/Implementation/SendAgainMiddleware.php # src/Queue.php # src/Worker/Worker.php # tests/App/FakeHandler.php # tests/Integration/MessageConsumingTest.php # tests/Integration/MiddlewareTest.php # tests/TestCase.php # tests/Unit/QueueTest.php # tests/Unit/SynchronousAdapterTest.php # tests/Unit/WorkerTest.php
# Conflicts: # config/di.php # config/params.php # src/Message/EnvelopeTrait.php # src/Message/JsonMessageSerializer.php # src/QueueInterface.php # src/Worker/Worker.php # tests/App/FakeHandler.php # tests/TestCase.php # tests/Unit/EnvelopeTest.php # tests/Unit/Message/JsonMessageSerializerTest.php # tests/Unit/Middleware/FailureHandling/MiddlewareFactoryTest.php # tests/Unit/WorkerTest.php
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #190 +/- ##
============================================
- Coverage 84.65% 77.24% -7.41%
+ Complexity 372 284 -88
============================================
Files 47 45 -2
Lines 1088 914 -174
============================================
- Hits 921 706 -215
- Misses 167 208 +41 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes:
Differences:
Psr\EventDispatcherInterface
SynchronousAdapter
triggers on both console and web request end events instead of__destruct()
methodPushDispatcher
,ConsomeDispatcher
,FailureDispatcher
and tens of related classesHandlerEnvelope
How to handle messages now:
app/config/common/queue.php
file\Yiisoft\Queue\Message\MessageInterface
.\Yiisoft\Queue\Message\MessageTrait
may help with ityiisoft/event-dispatcher
onesThere are
HelloeMessage
itself:And it's handler:
Now you can use the queue as a regular service in any services or controllers:
After a
\Yiisoft\Yii\Http\Event\AfterRequest
event is thrown application event dispatcher can triggerSynchronousAdapter::run()
and it process allin-memory
messages.SynchronousAdapter
does double un- and serialization to apply all envelopes to the final message. SoSynchronousAdapter
stores serialized with\Yiisoft\Queue\Message\MessageSerializerInterface
, currently it's\Yiisoft\Queue\Message\JsonMessageSerializer
.When it starts to handles the stored messages it decodes the ones with the same
\Yiisoft\Queue\Message\MessageSerializerInterface
and applies all envelopes before it goes to the final queue message handler.