sub download :Local :Args(0) { my ( $self, $c ) = @_; my $user_given_job_id = $c->request->params->{job_id}; my $impute_job = $c->user->jobViews->search({id => $user_given_job_id, status => 10})->first(); $c->model('DB::task')->create({name => 'send_access_key', parameters => {job_id => $impute_job->id()}, active => 1}); $c->stash->{template} = 'download.tt'; $c->stash->{jobid} = $impute_job->id(); $c->stash->{jobname} = $impute_job->name(); }