<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sergeich5 / php-supervisor-status-checker example snippets
// MyCallbackHandler.php
class MyCallbackHandler extends \Sergeich5\SupervisorStatusChecker\Callback\CallbackHandler
{
function onBeforeTick()
{
// YOUR LOGIC HERE
}
function onAfterTick()
{
// YOUR LOGIC HERE
}
function onFatal(string $processName)
{
// YOUR LOGIC HERE
}
function onRunning(string $processName)
{
// YOUR LOGIC HERE
}
function onStarting(string $processName)
{
// YOUR LOGIC HERE
}
function onBackoff(string $processName)
{
// YOUR LOGIC HERE
}
function onStopped(string $processName)
{
// YOUR LOGIC HERE
}
function onUnknown(string $processName, string $status)
{
// YOUR LOGIC HERE
}
}
$loop = new \Sergeich5\SupervisorStatusChecker\Checker(
new MyCallbackHandler(),
true,
false
);
$loop->checkLoop( int DELAY_IN_SECONDS );
$loop->checkOnce();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.