Skip to content
Snippets Groups Projects

Issue #3248544: Build in some buffer time when validating cron frequency based on last run time

Merged Issue #3248544: Build in some buffer time when validating cron frequency based on last run time
1 unresolved thread
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
171 171 // installed, defaulting to the beginning of the Unix epoch.
172 172 $cron_last = $this->state->get('system.cron_last', $this->state->get('install_time', 0));
173 173
174 // @todo Should we allow a little extra time in case the server job takes
175 // longer than expected? Otherwise a server setup with a 3-hour cron job
176 // will always give this warning. Maybe this isn't necessary because the
177 // last cron run time is recorded after cron runs. Address this in
178 // https://www.drupal.org/project/automatic_updates/issues/3248544.
179 if ($this->time->getRequestTime() - $cron_last > static::WARNING_INTERVAL) {
174 // Allowing a little extra time (120 seconds) in case the server job takes
175 // longer than expected.
  • Comment on lines +174 to +175

    I don't think this gives enough information as to why we need this buffer. I feel like if saw this later I would probably do a git history to find the issue that added this change. And someone not involved in this issue would have no other context.

    I am going to push up a suggested change for others to review.

  • Ted Bowman changed this line in version 4 of the diff

    changed this line in version 4 of the diff

  • Please register or sign in to reply
  • Ted Bowman added 1 commit

    added 1 commit

    • 1bc622da - add clearer comment and longer buffer

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading