Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Function prod_monitor_cron() tries to limit it's execution time to 180 seconds.
This does not work because it is using REQUEST_TIME which is a constant containing the time the http request was received and not time() which returns the current time.
For me this bug is fine since I do not need the non-configurable hard limit of 180 seconds anyway ;)
Comments
Comment #1
malc0mn CreditAttribution: malc0mn commentedAre you sure about this? I based in on the D7 documentation:
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...
The code example reads:
And the constant gets set this way:
As a last check I did this from the commandline:
So I don't think this is an issue at all...?
Comment #2
JvE CreditAttribution: JvE commentedYes, I'm very sure.
This is the code with the original comments removed and mine added:
Comment #3
malc0mn CreditAttribution: malc0mn commentedVery obvious indeed! I misunderstood and thought you meant REQUEST_TIME is not set in a CLI environment...
Fixed in 7.x-1.x-dev. Thanks for the report!