You are here

public static function UltimateCronSignal::peek in Ultimate Cron 7.2

Get a signal without claiming it.

Parameters

string $name: The name of the job.

string $signal: The name of the signal.

Return value

string The signal if any.

File

./ultimate_cron.signal.inc, line 22
File containing functions for Ultimate Cron signal handling.

Class

UltimateCronSignal
Class for handling Ultimate Cron signals.

Code

public static function peek($name, $signal) {
  $target = _ultimate_cron_get_transactional_safe_connection();
  return db_select('ultimate_cron_signal', 's', array(
    'target' => $target,
  ))
    ->fields('s', array(
    'job_name',
  ))
    ->condition('job_name', $name)
    ->condition('signal_name', $signal)
    ->condition('claimed', 0)
    ->execute()
    ->fetchField();
}