/** * @method modifiedStatus * @access public * * Modified status of the current record and paste * all needed attributes/values * save it into base * * @return (void) */ public function modifiedStatus() { $model = new Workers(); $record = $model->findFirst(array(array("jobname" => $this->getWorkJob()->handle()))); $this->_loger->info("Get last recordId by jobname: " . $record->getId()); echo "Get last recordId by jobname: " . $record->getId() . "\n"; $record->status = 2; $record->jobend = new MongoDate(); $record->logresult = $this->getLastLogFile(); $record->save(); $this->_loger->info("Work is finished and status in base is change at 2, at recordId: " . $record->getId()); echo "Work is finished and status in base is change at 2, at recordId: " . $record->getId() . "\n"; }