public static function UltimateCronSignalCache::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.
1 call to UltimateCronSignalCache::peek()
- UltimateCronSignalCache::get in ./
ultimate_cron.cache-signal.inc - Get and claim signal.
File
- ./
ultimate_cron.cache-signal.inc, line 22 - File containing functions for Ultimate Cron signal handling using cache.
Class
- UltimateCronSignalCache
- Class for handling Ultimate Cron signals.
Code
public static function peek($name, $signal) {
$bin = variable_get('ultimate_cron_signal_cache_bin', 'signal');
$cache = cache_get("signal-{$name}-{$signal}", $bin);
if ($cache) {
$flushed = cache_get("flushed-{$name}", $bin);
if (!$flushed || $cache->created > $flushed->created) {
return $cache->data;
}
}
return FALSE;
}