2021-09-19 16:42:29 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Server\Worker;
|
|
|
|
|
|
|
|
|
|
use Kiri\Kiri;
|
|
|
|
|
use Psr\EventDispatcher\EventDispatcherInterface;
|
|
|
|
|
use Server\ServerManager;
|
|
|
|
|
|
|
|
|
|
class OnTaskerStart extends WorkerStart implements EventDispatcherInterface
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @throws \Kiri\Exception\ConfigException
|
|
|
|
|
* @throws \ReflectionException
|
|
|
|
|
*/
|
|
|
|
|
public function dispatch(object $event)
|
|
|
|
|
{
|
|
|
|
|
$time = microtime(true);
|
|
|
|
|
|
|
|
|
|
ServerManager::setEnv('environmental', Kiri::TASK);
|
|
|
|
|
if (!is_enable_file_modification_listening()) {
|
|
|
|
|
$this->interpretDirectory();
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-20 00:52:44 +08:00
|
|
|
$this->mixed($event, false, $time);
|
2021-09-19 16:42:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|