hydra-notify: call TaskRetries->save_task if a task fails

This commit is contained in:
Graham Christensen 2021-08-26 17:08:22 -04:00
parent b0055a23df
commit c0e86faa78

View file

@ -73,7 +73,15 @@ GetOptions(
my $db = Hydra::Model::DB->new();
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;