Skip to content

Publish mercure updates on flush #2578

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

Merged
merged 1 commit into from
Mar 6, 2019
Merged

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Mar 4, 2019

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets na
License MIT
Doc PR na

When persisting from a messenger Handler, mercure updates where not published because kernel.terminate is not used in that context. This will use doctrine postFlush instead to publish mercure updates.

@soyuka soyuka merged commit 92adbec into api-platform:2.4 Mar 6, 2019
@soyuka soyuka deleted the fix-mercure-flush branch March 6, 2019 08:55
@bendavies
Copy link
Contributor

in what context is kernel.terminate not fired? this will cause delays to the client and was infact changed from doctrine postflush to kernel terminate in the original PR #2282

@dunglas
Copy link
Member

dunglas commented Mar 13, 2019

@bendavies when using a Messenger consumer, this event is only triggered when the command running the consumers terminates (as it's a demon, it's not "real-time" at all anymore :)).

@bendavies
Copy link
Contributor

Ah right. I'm amazed the consumer doesn't provide an event to hook into here.

@dunglas
Copy link
Member

dunglas commented Mar 13, 2019

Such events could be added soon: symfony/symfony#30557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants