actions not writing to outputs
-
Hello,
I’ve been facing a strange issue with Action Scheduler where if I run ‘as_enqueue_async_action’ the action will run correctly and all code will be executed, however if in that action there’s code to write into any file (including debug.log) then the write will fail most of the time randomly, however the code will run to the end correctly with no errors at all.
Take this example:
//... as_enqueue_async_action( 'my_test_hook', ['test' => 'hello'] ); //... //... add_action( 'my_test_hook', function( $args ) { $logger = wc_get_logger(); // Write a log entry $logger->debug('Your log message'); error_log('test'); }, 10, 1 ); //...
In the example, in my case, the logger will log about 1/5th of the
my_test_hook
executions.Things I’ve tried;
- Turning off caches;
- Making sure debug is on;
- Re-writing all functions in every way I can think of;
- Checking file permissions;
- Updating plugins;
- Scouring the internet and talking to ChatGPT for solutions.
If anyone has ANY idea about what could be causing this strange inconsistency, please share it.
Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘actions not writing to outputs’ is closed to new replies.