Revision 0ebb9b21
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/BackgroundJob/CleanUpRecordEmailFolders.pm | ||
---|---|---|
1 |
package SL::BackgroundJob::CleanUpRecordEmailFolders; |
|
2 |
|
|
3 |
use strict; |
|
4 |
use warnings; |
|
5 |
|
|
6 |
use parent qw(SL::BackgroundJob::Base); |
|
7 |
|
|
8 |
use SL::IMAPClient; |
|
9 |
|
|
10 |
sub clean_up_record_folders { |
|
11 |
my ($self) = @_; |
|
12 |
my $imap_client = SL::IMAPClient->new(); |
|
13 |
|
|
14 |
my $open_sales_orders = SL::DB::Manager::Order->get_all( |
|
15 |
query => [ |
|
16 |
vendor_id => undef, |
|
17 |
closed => 0, |
|
18 |
], |
|
19 |
); |
|
20 |
|
|
21 |
$imap_client->clean_up_record_folders($open_sales_orders); |
|
22 |
} |
|
23 |
|
|
24 |
sub run { |
|
25 |
my ($self, $job_obj) = @_; |
|
26 |
$self->{job_obj} = $job_obj; |
|
27 |
|
|
28 |
$self->clean_up_record_folders(); |
|
29 |
|
|
30 |
return; |
|
31 |
} |
|
32 |
|
|
33 |
1; |
|
34 |
|
|
35 |
__END__ |
|
36 |
|
|
37 |
=encoding utf8 |
|
38 |
|
|
39 |
=head1 NAME |
|
40 |
|
|
41 |
SL::BackgroundJob::CleanUpRecordEmailFolders - Background job for removing email folders of closed records. |
|
42 |
|
|
43 |
=head1 SYNOPSIS |
|
44 |
|
|
45 |
This background job syncs all emails to emails files to the corresponding |
|
46 |
record and than removes email folders of closed records. |
|
47 |
|
|
48 |
=head1 BUGS |
|
49 |
|
|
50 |
Nothing here yet. |
|
51 |
|
|
52 |
=head1 AUTHOR |
|
53 |
|
|
54 |
Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt> |
|
55 |
|
|
56 |
=cut |
Auch abrufbar als: Unified diff
CleanUpRecordEmailFolders: Beleg-Email-Ordner sync und aufräumen
Ordner geschlossener Belege werden gelöscht.