Revision f751112d
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
SL/Controller/BackgroundJob.pm | ||
---|---|---|
13 | 13 |
|
14 | 14 |
use Rose::Object::MakeMethods::Generic |
15 | 15 |
( |
16 |
scalar => [ qw(background_job) ], |
|
17 |
'scalar --get_set_init' => [ qw(task_server back_to models) ], |
|
16 |
'scalar --get_set_init' => [ qw(task_server back_to models background_job) ], |
|
18 | 17 |
); |
19 | 18 |
|
20 | 19 |
__PACKAGE__->run_before('check_auth'); |
21 | 20 |
__PACKAGE__->run_before('check_task_server'); |
22 |
__PACKAGE__->run_before('load_background_job', only => [ qw(edit update destroy execute show) ]); |
|
23 | 21 |
|
24 | 22 |
# |
25 | 23 |
# actions |
... | ... | |
149 | 147 |
$self->redirect_to($self->back_to); |
150 | 148 |
} |
151 | 149 |
|
152 |
sub load_background_job { |
|
153 |
my ($self) = @_; |
|
154 |
$self->background_job(SL::DB::BackgroundJob->new(id => $::form->{id})->load); |
|
150 |
sub init_background_job { |
|
151 |
return $::form->{id} ? SL::DB::BackgroundJob->new(id => $::form->{id})->load : undef; |
|
155 | 152 |
} |
156 | 153 |
|
157 | 154 |
sub init_task_server { |
Auch abrufbar als: Unified diff
Hintergrundjobs: »Speichern & Ausführen« darf keinen neuen Job anlegen
Siehe #256.