Revision 65b2387a
Von Moritz Bunkus vor mehr als 5 Jahren hinzugefügt
SL/BackgroundJob/CsvImport.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::BackgroundJob::Base); |
6 | 6 |
|
7 |
use YAML (); |
|
8 | 7 |
use SL::JSON; |
8 |
use SL::YAML; |
|
9 | 9 |
use SL::DB::CsvImportProfile; |
10 | 10 |
|
11 | 11 |
sub create_job { |
... | ... | |
23 | 23 |
type => 'once', |
24 | 24 |
active => 1, |
25 | 25 |
package_name => $package, |
26 |
data => YAML::Dump(\%data), |
|
26 |
data => SL::YAML::Dump(\%data),
|
|
27 | 27 |
); |
28 | 28 |
|
29 | 29 |
return $job; |
... | ... | |
33 | 33 |
my ($self) = @_; |
34 | 34 |
|
35 | 35 |
if (!$self->{profile}) { |
36 |
my $data = YAML::Load($self->{db_obj}->data); |
|
36 |
my $data = SL::YAML::Load($self->{db_obj}->data);
|
|
37 | 37 |
$self->{profile} = SL::DB::Manager::CsvImportProfile->find_by(id => $data->{profile_id}); |
38 | 38 |
} |
39 | 39 |
|
Auch abrufbar als: Unified diff
Module: gebundletes YAML durch dünnen Wrapper über YAML::XS & YAML ersetzt