fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

blame.class.php
Go to the documentation of this file.
1 <?php
24 class Blame extends TaskingElement
25 {
31  public function __construct()
32  {
33  parent::__construct();
34  $taskStorageNodeID = $this->Task->get('storagenodeID');
35  $taskStorageGroupID = $this->Task->get('storagegroupID');
36  $failtime = self::niceDate('+5 minutes')
37  ->format('Y-m-d H:i:s');
38  foreach ((array)$this->StorageNodes as &$StorageNode) {
39  if ($taskStorageID < 1
40  || in_array($taskStorageID, self::getAllBlamedNodes())
41  ) {
42  $this
43  ->Task
44  ->set('stateID', self::getQueuedState());
45  continue;
46  }
47  self::getClass('NodeFailure')
48  ->set('storagegroupID', $taskStorageGroupID)
49  ->set('storagenodeID', $taskStorageNodeID)
50  ->set('failureTime', $failtime)
51  ->set('taskID', $this->Task->get('id'))
52  ->set('hostID', self::$Host->get('id'))
53  ->save();
54  $this->Task
55  ->set('stateID', self::getQueuedState());
56  unset($StorageNode);
57  }
58  if ($this->Task->save()) {
59  echo '##';
60  }
61  exit;
62  }
63 }
FOGBase\niceDate
static niceDate($date='now', $utc=false)
Definition: fogbase.class.php:1105
FOGController\save
save()
Definition: fogcontroller.class.php:387
exit
exit
Definition: download.php:102
TaskingElement\$StorageNode
$StorageNode
Definition: taskingelement.class.php:47
FOGBase\getClass
static getClass($class, $data='', $props=false)
Definition: fogbase.class.php:439
TaskingElement
Definition: taskingelement.class.php:23
FOGController\get
get($key='')
Definition: fogcontroller.class.php:207
Task\set
set($key, $value)
Definition: task.class.php:225
Task
Definition: task.class.php:23
$Host
$Host
Definition: hostnameloop.php:30
Blame\__construct
__construct()
Definition: blame.class.php:31
Blame
Definition: blame.class.php:25