Fixed updating last import date for backends.
This commit is contained in:
@@ -334,12 +334,15 @@ class ExportCommand extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
if (true === (bool)Data::get(sprintf('%s.has_errors', $name))) {
|
||||
$this->logger->notice(
|
||||
sprintf('%s: Not updating last export date. Backend reported an error.', $name)
|
||||
);
|
||||
} else {
|
||||
if (false === (bool)Data::get("{$name}.has_errors", false)) {
|
||||
Config::save(sprintf('servers.%s.export.lastSync', $name), time());
|
||||
} else {
|
||||
$this->logger->warning(
|
||||
'SYSTEM: Not updating last export date for [%(backend)]. Backend reported an error.',
|
||||
[
|
||||
'backend' => $name,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -249,8 +249,15 @@ class ImportCommand extends Command
|
||||
|
||||
$inDryMode = $this->mapper->inDryRunMode() || ag($server, 'options.' . Options::DRY_RUN);
|
||||
|
||||
if (false === Data::get(sprintf('%s.has_errors', $name)) && false === $inDryMode) {
|
||||
if (false === (bool)Data::get("{$name}.has_errors", false) && false === $inDryMode) {
|
||||
Config::save(sprintf('servers.%s.import.lastSync', $name), time());
|
||||
} else {
|
||||
$this->logger->warning(
|
||||
'SYSTEM: Not updating last import date for [%(backend)]. Backend reported an error.',
|
||||
[
|
||||
'backend' => $name,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user