You are here

function elysia_cron_internal_execute_channel_cleanup in Elysia Cron 6.2

Same name and namespace in other branches
  1. 7.2 elysia_cron.module \elysia_cron_internal_execute_channel_cleanup()

Shutdown function for cron cleanup.

Used for unexpected termination of code.

1 string reference to 'elysia_cron_internal_execute_channel_cleanup'
elysia_cron_internal_execute_channel in ./elysia_cron.module
Internal function to execute all jobs in a channel elysia_cron_lock_env() must be called BEFORE calling this method

File

./elysia_cron.module, line 1385

Code

function elysia_cron_internal_execute_channel_cleanup() {
  global $elysia_cron_settings, $elysia_cron_current_channel, $cron_completed, $cron_completed_time;
  if ($cron_completed) {
    return;
  }

  // See if the semaphore is still locked.
  if (elysia_cron_is_channel_running($elysia_cron_current_channel)) {
    $last_job = elysia_cron_execute_aborted($elysia_cron_current_channel);
    elysia_cron_warning('Unexpected termination of cron channel %channel, aborted. Last job executed: %job', array(
      '%channel' => $elysia_cron_current_channel,
      '%job' => $last_job,
    ));
  }
}