for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Babel\Monit;
use App\Models\Eloquent\JudgeServerModel;
use ErrorException;
use Exception;
use Throwable;
class MonitorBase
{
public function updateStatus($jsid, $status)
$judgeServer=JudgeServerModel::find($jsid);
if (is_null($judgeServer)) {
return false;
} else {
if ($judgeServer->available==0) {
$status=-2;
}
$judgeServer->status=$status;
$judgeServer->status_update_at=date("Y-m-d H:i:s");