Changeset 299


Ignore:
Timestamp:
02/23/10 14:16:34 (10 years ago)
Author:
sander
Message:

Re-queue requests that get new jobs added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/app/models/request.php

    r297 r299  
    214214                } 
    215215 
     216                // If this request had already finished and isn't expired yet, set it back to queued. 
     217                $requeue = ( 
     218                        $request['Request']['state'] == self::STATE_FINISHED 
     219                        && ($request['Request']['expire'] == '0000-00-00 00:00:00' || strtotime($request['Request']['expire']) < time()) 
     220                ) 
     221 
     222                if ($requeue) { 
     223                        $this->saveField('state', self::STATE_QUEUED); 
     224                } 
     225 
    216226                return $jobCount; 
    217227        } 
Note: See TracChangeset for help on using the changeset viewer.