* Rename variable name of metric.

This commit is contained in:
zhouxin
2023-07-06 11:07:13 +08:00
parent 88aec3e0e0
commit 8d2d288ef4
+3 -3
View File
@@ -46,14 +46,14 @@ class metricModel extends model
$now = date('H:i');
$metricList = $this->dao->select('code,cronType,cronList,execTime')->from(TABLE_METRIC)
->where('collectType')->eq('cron')
->where('when')->eq('cron')
->fetchAll();
$excutableMetrics = array();
foreach($metricList as $metric)
{
if($metric->cronType == 'week' and strpos($metric->cronList, $currentWeek) === false) continue;
if($metric->cronType == 'month' and strpos($metric->cronList, $currentDay) === false) continue;
if($metric->crontab == 'week' and strpos($metric->cronList, $currentWeek) === false) continue;
if($metric->crontab == 'month' and strpos($metric->cronList, $currentDay) === false) continue;
if($now < $metric->execTime) continue;
$excutableMetrics[] = $metric->code;