You are here

function elysia_cron_build_semaphore_name in Elysia Cron 7.2

Return semaphore name by channel.

Parameters

string|null $channel: Channel name or NULL if channel not set.

Return value

string Semaphore name trimmed by 255 chars length.

2 calls to elysia_cron_build_semaphore_name()
elysia_cron_lock_env in ./elysia_cron.module
Use this before checking and modifying environment variables.
elysia_cron_unlock_env in ./elysia_cron.module
Unlock system locked with elysia_cron_lock_env.

File

./elysia_cron.module, line 1221

Code

function elysia_cron_build_semaphore_name($channel) {
  $semaphore_name = 'elysia_cron_semaphore';
  if (isset($channel)) {
    $semaphore_name .= ':' . $channel;
  }
  return drupal_substr($semaphore_name, 0, 255);
}