The Statamic::isWorker()
check may need to also apply to console commands
#10514
Labels
Statamic::isWorker()
check may need to also apply to console commands
#10514
Bug description
The entry stache is prone to getting out of sync when console commands are running at the same time as someone is modifying entries in the admin panel.
We have experienced a number of different issues from this, such as:
Something that does address this issue is updating
Statamic::isWorker()
to simply returnApp::runningInConsole()
, although I am not currently sure of the performance implications of doing so.How to reproduce
See the example test
entry_stache_maintains_sync_with_cli_commands
here:cms/tests/Data/Entries/EntryTest.php
Lines 2578 to 2639 in 621180a
When uncommenting the following line, you'll see that the test functions correctly.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: