1 cron_example.module cron_example_queue_report_work($worker, $item)

Simple reporter for the workers.

Parameters

int $worker: Worker number.

object $item: The $item which was stored in the cron queue.

Related topics

File

modules/examples/cron_example/cron_example.module, line 254
Hook implementations for the Cron Example module.

Code

function cron_example_queue_report_work($worker, $item) {
  if (!empty($GLOBALS['cron_example_show_status_message'])) {
    backdrop_set_message(
    t('Queue @worker worker processed item with sequence @sequence created at @time', 
    array(
      '@worker' => $worker,
      '@sequence' => $item->sequence,
      '@time' => cron_example_date_iso8601($item->created),
    )
    )
    );
  }
  watchdog('cron_example', 'Queue @worker worker processed item with sequence @sequence created at @time', 
  array(
    '@worker' => $worker,
    '@sequence' => $item->sequence,
    '@time' => cron_example_date_iso8601($item->created),
  )
  );
}