Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Publish mercure updates on flush#2578

Merged
soyuka merged 1 commit intoapi-platform:2.4from
soyuka:fix-mercure-flush
Mar 6, 2019
Merged

Publish mercure updates on flush#2578
soyuka merged 1 commit intoapi-platform:2.4from
soyuka:fix-mercure-flush

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