Changeset 396


Ignore:
Timestamp:
07/23/10 11:14:26 (11 years ago)
Author:
sander
Message:

Set failures to zero when requeueing a job

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/app/controllers/jobs_controller.php

    r377 r396  
    196196                $this->Job->id = $id; 
    197197                $this->Job->saveField('state', $state); 
     198        } 
     199 
     200        /** 
     201         * Manually mark job as failed 
     202         */ 
     203        public function fail($id = null) 
     204        { 
     205                $this->_setState(Job::STATE_FAILED, $id); 
    198206                $this->redirect(array('action' => 'view', $id)); 
    199207        } 
     
    202210         * Manually mark job as failed 
    203211         */ 
    204         public function fail($id = null) 
    205         { 
    206                 $this->_setState(Job::STATE_FAILED, $id); 
    207         } 
    208  
    209         /** 
    210          * Manually mark job as failed 
    211          */ 
    212212        public function requeue($id = null) 
    213213        { 
    214214                $this->_setState(Job::STATE_QUEUED, $id); 
     215                $this->Job->saveField('failures', 0); 
     216                $this->redirect(array('action' => 'view', $id)); 
    215217        } 
    216218 
Note: See TracChangeset for help on using the changeset viewer.