Merge branch 'develop' into feature/mzl_dev

This commit is contained in:
mzl
2025-10-21 13:41:27 +08:00
+9 -21
View File
@@ -12,15 +12,15 @@ class CheckWeb
public function onWorkerStart() public function onWorkerStart()
{ {
if (getenv('ENVIRONMENT') === 'master') { // if (getenv('ENVIRONMENT') === 'master') {
new Crontab('0 */10 * * * *', function(){ // new Crontab('0 */10 * * * *', function(){
$result = $this->tocurl('https://magicbridgeauto.com'); // $result = $this->tocurl('https://magicbridgeauto.com');
if (!preg_match('/magicbridgeauto/', $result['body'])) { // if (!preg_match('/magicbridgeauto/', $result['body'])) {
flg("【magicbridgeauto】疑似被篡改"); // flg("【magicbridgeauto】疑似被篡改");
} // }
return true; // return true;
}); // });
} // }
new Crontab('*/50 * * * * *', function(){ new Crontab('*/50 * * * * *', function(){
$userIds = User::where('status', 1)->pluck('id')->toArray(); $userIds = User::where('status', 1)->pluck('id')->toArray();
@@ -36,18 +36,6 @@ class CheckWeb
} }
public function check()
{
$result = $this->tocurl('https://magicbridgeauto.com');
if (!preg_match('/magicbridgeauto/', $result['body'])) {
// flg("【magicbridgeauto】未检查到异常");
// } else {
flg("【magicbridgeauto】疑似被篡改");
}
return true;
}
public function tocurl($url, $header = null, $content = null) public function tocurl($url, $header = null, $content = null)
{ {
$ch = curl_init(); $ch = curl_init();