From 2b2624e55d9b62c19cb96f8cc32b47cc3aeb5d15 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 30 Sep 2023 11:43:58 -0400 Subject: [PATCH] cron call --- www-api/app/Config/Constants.php | 2 +- www-api/app/Controllers/WrenchCrons.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index 68cea992..9a9ff4f5 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -92,7 +92,7 @@ define('EVENT_PRIORITY_NORMAL', 100); * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead. */ define('EVENT_PRIORITY_HIGH', 10); - +define('WRB_JOB_CRONJOB',770); define('LOGIN_MODE_GENERAL', 1100); define('LOGIN_MODE_FAMILY', 1105); diff --git a/www-api/app/Controllers/WrenchCrons.php b/www-api/app/Controllers/WrenchCrons.php index 44671389..a8b0f766 100644 --- a/www-api/app/Controllers/WrenchCrons.php +++ b/www-api/app/Controllers/WrenchCrons.php @@ -5,9 +5,14 @@ namespace App\Controllers; class WrenchCrons extends BaseController { public function apigate(){ + $in["action"] =WRB_JOB_CRONJOB; + $wrenchboard = new \App\Models\BackendModel(); + $ret = $wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + log_message('critical', "WrenchCrons ===> 0001"); - $response = []; //json_decode($complete, true); - return $this->response->setJson($response); + //$response = []; //json_decode($complete, true); + return $this->response->setJson($out); } } \ No newline at end of file