Skip to content

Commit

Permalink
Backup fix
Browse files Browse the repository at this point in the history
Fixing backup restoring procedure
  • Loading branch information
sergejey committed Mar 17, 2024
1 parent 2c9697f commit ed1bf3d
Show file tree
Hide file tree
Showing 4 changed files with 618 additions and 663 deletions.
3 changes: 0 additions & 3 deletions lib/common.class.php
Expand Up @@ -307,19 +307,16 @@ function runScheduledJobs()
$total = count($jobs);

for ($i = 0; $i < $total; $i++) {
//echo "Running job: " . $jobs[$i]['TITLE'] . "\n";
$jobs[$i]['PROCESSED'] = 1;
$jobs[$i]['STARTED'] = date('Y-m-d H:i:s');

//SQLUpdate('jobs', $jobs[$i], array('PROCESSED', 'STARTED'));
SQLExec("UPDATE jobs SET PROCESSED=" . $jobs[$i]['PROCESSED'] . ", STARTED='" . $jobs[$i]['STARTED'] . "' WHERE ID=" . $jobs[$i]['ID']);

if ($jobs[$i]['COMMANDS'] != '') {
$url = BASE_URL . '/objects/?system_call=1&job=' . $jobs[$i]['ID'] . '&title=' . urlencode($jobs[$i]['TITLE']);
$result = trim(getURL($url, 0));
$result = preg_replace('/<!--.+-->/is', '', $result);
if (!preg_match('/OK$/', $result)) {
//getLogger(__FILE__)->error(sprintf('Error executing job %s (%s): %s', $jobs[$i]['TITLE'], $jobs[$i]['ID'], $result));
DebMes(sprintf('Error executing job %s (%s): %s', $jobs[$i]['TITLE'], $jobs[$i]['ID'], $result) . ' (' . __FILE__ . ')', 'errors');
}
}
Expand Down

0 comments on commit ed1bf3d

Please sign in to comment.