[open-ils-commits] r12970 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 22 16:13:24 EDT 2009


Author: miker
Date: 2009-04-22 16:13:20 -0400 (Wed, 22 Apr 2009)
New Revision: 12970

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
ordering events by run_time and then add_time to tie-break

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-04-22 18:49:23 UTC (rev 12969)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-04-22 20:13:20 UTC (rev 12970)
@@ -239,7 +239,7 @@
             "+atevdef" => { active => 't' },
             "+atev" => { state => 'pending' }
         },
-        order_by => { "+atev" => [ 'run_time' ] },
+        order_by => { "+atev" => [ 'run_time', 'add_time' ] },
         distinct => 1
     };
 
@@ -501,7 +501,7 @@
     my $editor = new_editor();
 
     return $editor->search_action_trigger_event(
-        { state => 'pending', run_time => {'<' => 'now'} },
+        [{ state => 'pending', run_time => {'<' => 'now'} }, { order_by => { atev => [ qw/run_time add_time/] } }]
         { idlist=> 1 }
     );
 }



More information about the open-ils-commits mailing list