an Tick Timer to discover nsqd producers for the configured topic.
@return void
194507
private function lookupdPollingTick()
    {
        // add some jitter
        $jitter = (float)rand() / (float)getrandmax()
            * NsqConfig::getLookupdPollJitter()
            * NsqConfig::getLookupdPollInterval();

        Timer::after(intval($jitter) + 1, function() {
            if ($this->isStopped) {
                return;
            }

            Timer::tick(NsqConfig::getLookupdPollInterval(), function() {
                try {
                    Task::execute($this->queryLookupd());
                } catch (\Throwable $t) {
                    sys_echo("lookupdPolling exception {$t->getMessage()}");
                } catch (\Exception $ex) {
                    sys_echo("lookupdPolling exception {$ex->getMessage()}");
                }
            }, $this->lookupdPollingTickId());
        });
    }
1281103
public function publishTimedRecords()
    {
        foreach ($this->contentTypeNames as $contentTypeName) {
            $this->timedHandleRecords($contentTypeName, 'timed');
        }
        $this->cache->save(self::CACHE_KEY_PUBLISH, true, $this->interval);
    }
341333
public function probe(): void
    {
        if(!isset($this->settings["constraints"])) 
            return;
        $constraints = $this->settings["constraints"];
        foreach($constraints as $constraint=>$constraint_val) {
            if(is_null($constraint_val))
                continue;
            switch($constraint) {
                case "format":
                    if(!in_array($constraint_val, [
                         "numeric",
                         "ip",
                         "email",
                         "url",
                         "creditCard",
                         "alpha",
                         "alphaNum"
                         // "date" // there is already the Date field
                    ])) {
                        /*
                        if($constraint_val == "uuid" || $constraint_val == "udid") {
                            try {
                                ID::fromString($this->value);
                            }
                            catch(LibGraph\Exceptions\MalformedIDException $e) {
                                throw new \InvalidArgumentException;
                            }
                        }
                        else {
                            throw new \InvalidArgumentException;
                        }
                        */
                        throw new \InvalidArgumentException;
                    }
                    $v = new Validator(["field"=>$this->value]);
                    $v->rule($constraint_val, "field");
                    if(!$v->validate()) {
                        throw new \InvalidArgumentException;
                    }
                    break;
                //case "dateFormat":
                case "dateBefore":
                case "dateAfter":
                    $v = new Validator(["field"=>$this->value]);
                    $v->rule($constraint, "field", $constraint_val);
                    if(!$v->validate()) {
                        throw new \InvalidArgumentException;
                    }
                    break;
                case "minLength":
                case "maxLength":
                case "greaterThan":
                case "lessThan":
                    Assert::$constraint($this->value, $constraint_val);
                    break;
                               
                case "id":
                    try {
                        ID::fromString($this->value);
                    }
                    catch(LibGraph\Exceptions\MalformedIDException $e) {
                        throw new \InvalidArgumentException;
                    }
                    break;
                
                case "regex":
                    /*
                    if($constraint_val[0]!="/")
                        Assert::$constraint($this->value, "/".addslashes($constraint_val)."/");
                    else*/
                        Assert::$constraint($this->value, $constraint_val);
                    break;
             } 
        }
    }
771554
public function onConfigUpdated()
    {
        if ($this->xmppclient) {
            $this->xmppclient->config = $this->config;
            $this->xmppclient->onConfigUpdated();
        }
    }
914252
protected function setTimers()
    {
        if (!$this->exists('session.timer.start')) {
            $start = time();

            $this->set('session.timer.start', $start);
            $this->set('session.timer.last', $start);
            $this->set('session.timer.now', $start);
        }

        $this->set('session.timer.last', $this->get('session.timer.now'));
        $this->set('session.timer.now', time());

        return $this;
    }
822782
public function enableTicks(int $tickFreq = null) {

        if (is_null($tickFreq)) {
            $tickFreq = self::$tickFreq;
        }

        // Change ticking frequency
        self::$tickFreq = $tickFreq;
        self::$lastTick = microtime(true);

        // If we're already ticking, don't register again
        if (self::$ticking) {
            return true;
        }

        register_tick_function(['\Kaecyra\AppCommon\Event', 'tick']);
    }
282137
public function run()
    {
        $this->timer = new Timer($this->name, true);

        if (!is_callable($this->callback)) {
            throw new \RuntimeException('No callback provided');
        }

        call_user_func($this->callback);

        $this->timer->tick();
    }
1101097
public function onApplicationReady()
    {
        $this->chatNotification->sendMessage("");
        $this->chatNotification->sendMessage("");
        $this->chatNotification->sendMessage('$z$fff$s       -  -   –    –     —     —    –    –   -   -');
        $this->chatNotification->sendMessage('$z$s$w$i$fff       e X p a n s i o n ²', null, []);
        $this->chatNotification->sendMessage(
            '$z$o$000                version$o '.AbstractApplication::EXPANSION_VERSION, null, []);

        $this->chatNotification->sendMessage('$z$s$fff                 —————————— ');
        $this->chatNotification->sendMessage("");
    }
199729
public function onSubscribe(ConnectionInterface $conn, $topic)
    {
        $this->console->info("onSubscribe: {$conn->WAMP->sessionId} topic: $topic {$topic->count()}");

        if (!array_key_exists($topic->getId(), $this->subscribedTopics)) {
            $this->subscribedTopics[$topic->getId()] = $topic;
            $this->console->info("subscribed to topic $topic");
        }
    }
1173044
public function configure()
    {
        parent::configure();

        /** @var \Symfony\Component\HttpFoundation\Session\Session $session */
        $session = $this->get('session');

        switch (strtolower($this->container->getParameter('networking_init_cms.db_driver'))) {
            case 'monodb':
                $lastEditedSubscriber = new ODMLastEditedListener($session);
                break;
            case 'orm':
                $lastEditedSubscriber = new ORMLastEditedListener($session);
                break;
            default:
                $lastEditedSubscriber = false;
                break;
        }

        if ($lastEditedSubscriber) {
            $this->dispatcher->addSubscriber($lastEditedSubscriber);
        }
    }
94353
public static function timerEnd()
    {
        Pool::createPool();

        // Disabled ?
        if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) ||
            AbstractController::$analysisInProgress ||
            Config::$disabledByPhp
        ) {
            return;
        }

        AbstractController::$analysisInProgress = true;

        static::$pool->createClass('Brainworxx\\Krexx\\Controller\\TimerController')
            ->noFatalForKrexx()
            ->timerEndAction()
            ->reFatalAfterKrexx();

        AbstractController::$analysisInProgress = false;
    }
1046108
protected function seedIncidents()
    {
        $incidentMessage = <<<'EINCIDENT'
# Of course it does!

What kind of web application doesn't these days?

## Headers are fun aren't they

It's _exactly_ why we need Markdown. For **emphasis** and such.
EINCIDENT;

        $defaultIncidents = [
            [
                'name'         => 'Our monkeys aren\'t performing',
                'message'      => 'We\'re investigating an issue with our monkeys not performing as they should be.',
                'status'       => Incident::INVESTIGATING,
                'component_id' => 0,
                'visible'      => 1,
                'stickied'     => false,
                'user_id'      => 1,
                'occurred_at'  => Carbon::now(),
            ],
            [
                'name'         => 'This is an unresolved incident',
                'message'      => 'Unresolved incidents are left without a **Fixed** update.',
                'status'       => Incident::INVESTIGATING,
                'component_id' => 0,
                'visible'      => 1,
                'stickied'     => false,
                'user_id'      => 1,
                'occurred_at'  => Carbon::now(),
            ],
        ];

        Incident::truncate();
        IncidentUpdate::truncate();

        foreach ($defaultIncidents as $defaultIncident) {
            $incident = Incident::create($defaultIncident);

            $this->seedIncidentUpdates($incident);
        }
    }
453342
protected function registerTickHandlers()
    {
        $self = $this;
        register_tick_function(function () use ($self) {
            if (!$self->prepared) {
                return;
            }

            if ($self->master) {
                while ($pid = pcntl_wait($status, WNOHANG)) {
                    if ($pid === -1) {
                        pcntl_signal_dispatch();
                        break;
                    }

                    if (empty($self->children[$pid])) continue;

                    $self->children[$pid]->emit('finish', $status);
                    $self->children[$pid]->shutdown($status);
                    $self->clear($pid);
                }
            }

            $self->emit('tick');

            if (!is_resource($self->queue) || !msg_stat_queue($self->queue)) {
                return;
            }

            while (msg_receive($self->queue, 1, $null, 1024, $msg, true, MSG_IPC_NOWAIT, $error)) {
                if (!is_array($msg) || empty($msg['to']) || $msg['to'] != $self->pid) {
                    $self->emit('unknown_message', $msg);
                } else {
                    if ($self->master) {
                        if (!empty($self->children[$msg['from']])
                            && ($process = $self->children[$msg['from']])
                        ) {
                            $process->emit('message', $msg['body']);
                        } else {
                            $self->emit('unknown_message', $msg);
                        }
                    } else if ($msg['from'] == $self->ppid) {
                        // Come from parent process
                        $self->process->emit('message', $msg['body']);
                    }
                }
            }
        });
    }
83915
public function onReady()
    {
        if ($this->config->enable->value) {
            $this->timer = setTimeout(function ($timer) {
                $this->touchCursor();
            }, 0.3e6);
        }
    }
536281
public function tick()
    {
        $count = $this->queue->count();

        while ($count-- && $this->loop->isRunning())
        {
            $this->callback = $this->queue->dequeue();
            $callback = $this->callback; // without this proxy PHPStorm marks line as fatal error.
            $callback($this->loop);
        }
    }
929194
protected function listenForEvents()
    {
        $events = $this->container['events'];

        $events->listen('nova.queue.processing', function ($connection, $job)
        {
            $this->writeOutput($job, 'starting');
        });

        $events->listen('nova.queue.processed', function ($connection, $job)
        {
            $this->writeOutput($job, 'success');
        });

        $events->listen('nova.queue.failed', function ($connection, $job)
        {
            $this->writeOutput($job, 'failed');
        });
    }
468215
public function initializeTimestamps()
    {
        if (is_null($this->createdAt) && is_null($this->updatedAt)) {
            $this->createdAt = Carbon::now();
            $this->updatedAt = Carbon::now();
        }
    }