Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 782fd788

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 782fd7884fb686cd2e336756dadeb4ab5d05a415
  • Vorgänger 295e585a
  • Nachfolger 03fc848d

BackgroundJob-Hilfsfunktionen

Unterschiede anzeigen:

SL/DB/BackgroundJob.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4 1
package SL::DB::BackgroundJob;
5 2

  
6 3
use strict;
7 4

  
5
use DateTime::Event::Cron;
6

  
8 7
use SL::DB::MetaSetup::BackgroundJob;
8
use SL::DB::Manager::BackgroundJob;
9

  
10
sub update_next_run_at {
11
  my $self = shift;
9 12

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
13
  my $cron = DateTime::Event::Cron->new_from_cron($self->cron_spec || '* * * * *');
14
  $self->update_attributes(next_run_at => $cron->next->set_time_zone($::locale->get_local_time_zone));
15
  return $self;
16
}
12 17

  
13 18
1;

Auch abrufbar als: Unified diff