hydra-notify: call TaskRetries->save_task if a task fails
This commit is contained in:
parent
b0055a23df
commit
c0e86faa78
|
@ -73,7 +73,15 @@ GetOptions(
|
||||||
my $db = Hydra::Model::DB->new();
|
my $db = Hydra::Model::DB->new();
|
||||||
|
|
||||||
my @plugins = Hydra::Plugin->instantiate(db => $db, config => $config);
|
my @plugins = Hydra::Plugin->instantiate(db => $db, config => $config);
|
||||||
my $task_dispatcher = Hydra::TaskDispatcher->new($db, $prom, [@plugins]);
|
my $task_dispatcher = Hydra::TaskDispatcher->new(
|
||||||
|
$db,
|
||||||
|
$prom,
|
||||||
|
[@plugins],
|
||||||
|
sub {
|
||||||
|
my ($task) = @_;
|
||||||
|
$db->resultset("TaskRetries")->save_task($task);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
my $dbh = $db->storage->dbh;
|
my $dbh = $db->storage->dbh;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue