public function beforeAction($action)
{
if (parent::beforeAction($action)) {
$this->initLogger();
if ($action->id != "index") {
throw new NotSupportedException("Only index action allowed in daemons. So, don't create and call another");
}
return true;
} else {
return false;
}
}