Closed Abdul-Dridi closed 11 months ago
@Abdul-Dridi thank you for this. Could you add a test or a few for the change?
@zerolab I've updated the existing tests, which were failing because the transaction wasn't committed. Did you also want me to write tests to explicity test pre commit vs post commit state?
All modified lines are covered by tests :white_check_mark:
Comparison is base (
e2de395
) 93.27% compared to head (3ce1f7e
) 93.32%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thank you for this @Abdul-Dridi, tidied up, brought up to date with main
and merged in #720
Our wagtail setup has us processing wagtail signals asynchronously (in celery tasks), we've noticed that when publishing localised content, the tasks asynchronous page database query oftentimes retrieves the page state before the translations have been synced.
From our testing, this occurs when a page db query is made before the translation transaction has been committed.
This pr pushes the page revision publish to be executed after the transaction has been successfully committed.