Synch
This commit is contained in:
parent
485709d61f
commit
3d3b073131
@ -78,7 +78,9 @@ class EndpointsApi extends ApiController{
|
|||||||
foreach ($obj['logs'] as $log) {
|
foreach ($obj['logs'] as $log) {
|
||||||
$deviceLogManager = new LogManager('../logs/devices/'. date("Y-m-d").'.log');
|
$deviceLogManager = new LogManager('../logs/devices/'. date("Y-m-d").'.log');
|
||||||
$deviceLogManager->setLevel(LOGLEVEL);
|
$deviceLogManager->setLevel(LOGLEVEL);
|
||||||
|
if ($log != 'HTTP_UPDATE_FAILD code-102 messageFile Not Found (404)'){
|
||||||
$deviceLogManager->write("[Device Log Msg] Device_ID " . $device['device_id'] . "->" . $log, LogRecordTypes::ERROR);
|
$deviceLogManager->write("[Device Log Msg] Device_ID " . $device['device_id'] . "->" . $log, LogRecordTypes::ERROR);
|
||||||
|
}
|
||||||
unset($deviceLogManager);
|
unset($deviceLogManager);
|
||||||
}
|
}
|
||||||
$this->response([
|
$this->response([
|
||||||
|
@ -96,7 +96,7 @@ class RecordManager{
|
|||||||
$dateTime = $dateTime->modify($periodLocal);
|
$dateTime = $dateTime->modify($periodLocal);
|
||||||
$dateTime = $dateTime->format('Y-m-d H:i:s');
|
$dateTime = $dateTime->format('Y-m-d H:i:s');
|
||||||
$groupBy = strtoupper($groupBy).'(time)';
|
$groupBy = strtoupper($groupBy).'(time)';
|
||||||
$sql = 'SELECT value, time, execuded FROM records
|
$sql = 'SELECT value, time, execuded, origin FROM records
|
||||||
WHERE
|
WHERE
|
||||||
subdevice_id = ?
|
subdevice_id = ?
|
||||||
AND
|
AND
|
||||||
|
Loading…
Reference in New Issue
Block a user