Merge branch 'master' into og-coreplugins

This commit is contained in:
Oliver Gorwits
2017-08-14 18:10:29 +01:00
10 changed files with 70 additions and 38 deletions

View File

@@ -126,12 +126,17 @@ my $target_version = $schema->schema_version;
# one step at a time, in case user has applied local changes already
for (my $i = $db_version; $i < $target_version; $i++) {
my $next = $i + 1;
try {
$schema->upgrade_single_step($i, $i + 1);
$schema->upgrade_single_step($i, $next);
}
catch {
warn "Error: $_"
if $_ !~ m/(does not exist|already exists)/;
# set row in dbix_class_schema_versions table
$schema->_set_db_version({version => $next})
if $schema->get_db_version < $next;
};
}

View File

@@ -241,10 +241,17 @@ foreach my $host (@hostlist) {
subaction => $extra,
});
my $actiontext = (
($job->device ? ('['.$job->device->ip.']') : '') .
($job->action eq 'show' ? ('/'.$job->subaction) : '')
);
# do job
my ($status, $log);
try {
info sprintf '%s: started at %s', $action, scalar localtime;
info sprintf '%s: %s started at %s',
$action, $actiontext, scalar localtime;
($status, $log) = $worker->$action($job);
}
catch {