From 6c7da40171a0d3d9df81eb99599be4a16fa93c95 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 12 Jan 2011 11:14:48 +0100 Subject: [PATCH] Dokumentation Conflicts: SL/BackgroundJob/CloseOverdueSalesQuotations.pm --- SL/BackgroundJob/Base.pm | 42 +++++++++++++++++++ SL/BackgroundJob/CleanBackgroundJobHistory.pm | 33 +++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/SL/BackgroundJob/Base.pm b/SL/BackgroundJob/Base.pm index 44702d84d..27f608129 100644 --- a/SL/BackgroundJob/Base.pm +++ b/SL/BackgroundJob/Base.pm @@ -29,3 +29,45 @@ sub create_standard_job { } 1; + +__END__ + +=encoding utf8 + +=head1 NAME + +SL::BackgroundJob::Base - Base class for all background jobs + +=head1 SYNOPSIS + +All background jobs are derived from this class. Each job gets its own +class which must implement the C method. + +There are two types of background jobs: periodic jobs and jobs that +are run once. Periodic jobs have a CRON spec associated with them that +determines the points in time when the job is supposed to be run. + +=head1 FUNCTIONS + +=over 4 + +=item C + +Creates or updates an entry in the database for the current job. If +the C table contains an entry for the current class +(as determined by C) then that entry is updated and +re-activated if it was disabled. Otherwise a new entry is created. + +This function can be called both as a member or as a class function. + +=back + +=head1 BUGS + +Nothing here yet. + +=head1 AUTHOR + +Moritz Bunkus Em.bunkus@linet-services.deE + +=cut diff --git a/SL/BackgroundJob/CleanBackgroundJobHistory.pm b/SL/BackgroundJob/CleanBackgroundJobHistory.pm index 117a4d4ad..002410e46 100644 --- a/SL/BackgroundJob/CleanBackgroundJobHistory.pm +++ b/SL/BackgroundJob/CleanBackgroundJobHistory.pm @@ -27,3 +27,36 @@ sub run { } 1; + +__END__ + +=encoding utf8 + +=head1 NAME + +SL::BackgroundJob::CleanBackgroundJobHistory - Background job for +cleaning the history table of all executed jobs + +=head1 SYNOPSIS + +This background job deletes old entries from the table +C. Each time a job is run an entry is +created in that table. + +The associated C instance's C may be a +hash containing the retention periods for successful and failed +jobs. Both are the number of days a history entry is to be kept. C<< +$data->{retention_success} >> defaults to 14. C<< +$data->{retention_failure} >> defaults to 90. + +The job is supposed to run once a day. + +=head1 BUGS + +Nothing here yet. + +=head1 AUTHOR + +Moritz Bunkus Em.bunkus@linet-services.deE + +=cut -- 2.20.1