-
-
Notifications
You must be signed in to change notification settings - Fork 449
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
In between while
loop runs, if the websites has high-traffic, $eventIds
will not reach 0 in a timely manner, which, in my case, i've seen the cron job run for over 40 minutes.
Current code:
Mage_Reports_Model_Resource_Event::clean
Expected Behavior
Clean ops should be in-dependent on traffic while running
Steps To Reproduce
- use k6 to force such traffic
- meanwhile run the cleaning process
Environment
- OpenMage: 20.10.2
- php: 8.2
Anything else?
Suggestions:
- Either run so fast that a loop-run will reach zero results (👎 )
- Filter the joined
visitor_table
table withMage::getSingleton('getLogCleanTime')->getLogCleanTime()
like app/code/core/Mage/Log/Model/Resource/Log.php#L70 - This is how i mitigated for the time being:
// -- code while(true) { // -- code if(count($eventIds) < 1000){ break; } }