ImportSource: set last_attempt on every attempt
This commit is contained in:
parent
6e4940d712
commit
38fec2c3d5
|
@ -81,6 +81,7 @@ class ImportSource extends DbObjectWithSettings
|
||||||
Benchmark::measure('Starting with import ' . $this->source_name);
|
Benchmark::measure('Starting with import ' . $this->source_name);
|
||||||
try {
|
try {
|
||||||
$import = new Import($this);
|
$import = new Import($this);
|
||||||
|
$this->last_attempt = date('Y-m-d H:i:s');
|
||||||
if ($import->providesChanges()) {
|
if ($import->providesChanges()) {
|
||||||
Benchmark::measure('Found changes for ' . $this->source_name);
|
Benchmark::measure('Found changes for ' . $this->source_name);
|
||||||
$this->hadChanges = true;
|
$this->hadChanges = true;
|
||||||
|
@ -99,7 +100,7 @@ class ImportSource extends DbObjectWithSettings
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->import_state = 'failing';
|
$this->import_state = 'failing';
|
||||||
Benchmark::measure('Import failed for ' . $this->source_name);
|
Benchmark::measure('Import failed for ' . $this->source_name);
|
||||||
$this->last_error_message = 'ERR: ' . $e->getMessage();
|
$this->last_error_message = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->hasBeenModified()) {
|
if ($this->hasBeenModified()) {
|
||||||
|
|
Loading…
Reference in New Issue