bugfixes
This commit is contained in:
parent
233071dd51
commit
8cfd2e0777
6
run.php
6
run.php
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$startTime = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
require(__DIR__ . "/classes/ApiHelper.php");
|
require(__DIR__ . "/classes/ApiHelper.php");
|
||||||
require(__DIR__ . "/config/config.php");
|
require(__DIR__ . "/config/config.php");
|
||||||
|
|
||||||
@ -19,7 +21,7 @@ if (file_exists($lockFile)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents("run.lock", strtotime('+5 minutes'));
|
file_put_contents($lockFile, strtotime('+5 minutes'));
|
||||||
|
|
||||||
if (file_exists(__DIR__ . "/logs/sync.log")) {
|
if (file_exists(__DIR__ . "/logs/sync.log")) {
|
||||||
$config['date_from'] = file_get_contents(__DIR__ . "/logs/sync.log");
|
$config['date_from'] = file_get_contents(__DIR__ . "/logs/sync.log");
|
||||||
@ -29,5 +31,5 @@ $apiHelper = new ApiHelper($сonfig);
|
|||||||
|
|
||||||
if ($apiHelper->processXMLOrders()) {
|
if ($apiHelper->processXMLOrders()) {
|
||||||
unlink($lockFile);
|
unlink($lockFile);
|
||||||
file_put_contents(__DIR__ . "/logs/sync.log", date('Y-m-d H:i:s'));
|
file_put_contents(__DIR__ . "/logs/sync.log", $startTime);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user