Skip to content
Permalink
Browse files

Merge pull request #495 from Anisan/patch-5

Simple Devices: fix run sheduler task
  • Loading branch information...
sergejey committed Mar 26, 2019
2 parents 12378e8 + e37af04 commit 9fe50a9e1bd6cb7b5c12992fa06912ef018fe649
Showing with 4 additions and 0 deletions.
  1. +4 −0 modules/devices/devices.class.php
@@ -463,6 +463,10 @@ function processSubscription($event, &$details)
if ($diff < 0 || $diff >= 10 * 60) {
continue;
}
$tmlr = strtotime($rec['LATEST_RUN']);
$diff_run = time() - $tmlr;
if ($diff_run <= 20*60)
continue;
$linked_object = $rec['LINKED_OBJECT'];
unset($rec['LINKED_OBJECT']);
$rec['LATEST_RUN'] = date('Y-m-d H:i:s');

1 comment on commit 9fe50a9

@tribukhouski

This comment has been minimized.

Copy link
Contributor

commented on 9fe50a9 Apr 2, 2019

что это за магические цифры 1060 и 2060?
да и формат даты давно пора вынести в define

Please sign in to comment.
You can’t perform that action at this time.