You are here

function elysia_cron_internal_execute_channel_cleanup in Elysia Cron 7.2

Same name and namespace in other branches
  1. 6.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.

File

./elysia_cron.module, line 1618

Code

function elysia_cron_internal_execute_channel_cleanup() {
  global $_elysia_cron_current_channel, $_cron_completed;
  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,
    ));
  }
}