projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8a2b96
)
BackgroundJob-Manager sortierbar machen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 28 Aug 2012 12:08:40 +0000
(14:08 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 28 Aug 2012 12:08:40 +0000
(14:08 +0200)
SL/DB/Manager/BackgroundJob.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Manager/BackgroundJob.pm
b/SL/DB/Manager/BackgroundJob.pm
index
96af863
..
1bb89ee
100644
(file)
--- a/
SL/DB/Manager/BackgroundJob.pm
+++ b/
SL/DB/Manager/BackgroundJob.pm
@@
-5,10
+5,17
@@
use strict;
use SL::DB::Helper::Manager;
use base qw(SL::DB::Helper::Manager);
+use SL::DB::Helper::Sorted;
+
sub object_class { 'SL::DB::BackgroundJob' }
__PACKAGE__->make_manager_methods;
+sub _sort_spec {
+ return ( default => [ 'next_run_at', 1 ],
+ columns => { SIMPLE => 'ALL' } );
+}
+
sub cleanup {
my $class = shift;
$class->delete_all(where => [ and => [ type => 'once', last_run_at => { lt => DateTime->now_local->subtract(days => '1') } ] ]);