Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6c7da401

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 6c7da40171a0d3d9df81eb99599be4a16fa93c95
  • Vorgänger 149d2f33
  • Nachfolger 1a36c8fc

Dokumentation

Conflicts:

SL/BackgroundJob/CloseOverdueSalesQuotations.pm

Unterschiede anzeigen:

SL/BackgroundJob/Base.pm
29 29
}
30 30

  
31 31
1;
32

  
33
__END__
34

  
35
=encoding utf8
36

  
37
=head1 NAME
38

  
39
SL::BackgroundJob::Base - Base class for all background jobs
40

  
41
=head1 SYNOPSIS
42

  
43
All background jobs are derived from this class. Each job gets its own
44
class which must implement the C<run> method.
45

  
46
There are two types of background jobs: periodic jobs and jobs that
47
are run once. Periodic jobs have a CRON spec associated with them that
48
determines the points in time when the job is supposed to be run.
49

  
50
=head1 FUNCTIONS
51

  
52
=over 4
53

  
54
=item C<create_standard_job $cron_spec>
55

  
56
Creates or updates an entry in the database for the current job. If
57
the C<background_jobs> table contains an entry for the current class
58
(as determined by C<ref($self)>) then that entry is updated and
59
re-activated if it was disabled. Otherwise a new entry is created.
60

  
61
This function can be called both as a member or as a class function.
62

  
63
=back
64

  
65
=head1 BUGS
66

  
67
Nothing here yet.
68

  
69
=head1 AUTHOR
70

  
71
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
72

  
73
=cut
SL/BackgroundJob/CleanBackgroundJobHistory.pm
27 27
}
28 28

  
29 29
1;
30

  
31
__END__
32

  
33
=encoding utf8
34

  
35
=head1 NAME
36

  
37
SL::BackgroundJob::CleanBackgroundJobHistory - Background job for
38
cleaning the history table of all executed jobs
39

  
40
=head1 SYNOPSIS
41

  
42
This background job deletes old entries from the table
43
C<background_job_histories>. Each time a job is run an entry is
44
created in that table.
45

  
46
The associated C<SL::DB::BackgroundJob> instance's C<data> may be a
47
hash containing the retention periods for successful and failed
48
jobs. Both are the number of days a history entry is to be kept.  C<<
49
$data->{retention_success} >> defaults to 14.  C<<
50
$data->{retention_failure} >> defaults to 90.
51

  
52
The job is supposed to run once a day.
53

  
54
=head1 BUGS
55

  
56
Nothing here yet.
57

  
58
=head1 AUTHOR
59

  
60
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
61

  
62
=cut

Auch abrufbar als: Unified diff