Skip to content

Commit

Permalink
Merge pull request #5242 from Martchus/cache-asset
Browse files Browse the repository at this point in the history
Avoid asset caching ending up with `Job terminated unexpectedly`
  • Loading branch information
mergify[bot] authored Jul 12, 2023
2 parents 6634b1c + bedeb96 commit 7116814
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/OpenQA/CacheService/Task/Asset.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

package OpenQA::CacheService::Task::Asset;
use Mojo::Base 'Mojolicious::Plugin', -signatures;
use OpenQA::Task::SignalGuard;
use Mojo::JSON;

sub register ($self, $app, $conf) { $app->minion->add_task(cache_asset => \&_cache_asset) }

sub _cache_asset ($job, $id, $type = undef, $asset_name = undef, $host = undef) {
my $ensure_task_retry_on_termination_signal_guard = OpenQA::Task::SignalGuard->new($job);
my $app = $job->app;
my $job_id = $job->id;
my $lock = $job->info->{notes}{lock};
Expand Down

0 comments on commit 7116814

Please sign in to comment.