storagenode.class.php (fogproject-1.5.8) | : | storagenode.class.php (fogproject-1.5.9) | ||
---|---|---|---|---|
skipping to change at line 306 | skipping to change at line 306 | |||
$this->set('usedtasks', (array)$used); | $this->set('usedtasks', (array)$used); | |||
} | } | |||
/** | /** | |||
* Gets this node's used count. | * Gets this node's used count. | |||
* | * | |||
* @return int | * @return int | |||
*/ | */ | |||
public function getUsedSlotCount() | public function getUsedSlotCount() | |||
{ | { | |||
$countTasks = 0; | $countTasks = 0; | |||
$multicastTaskID = array(8); | ||||
$usedtasks = $this->get('usedtasks'); | $usedtasks = $this->get('usedtasks'); | |||
$findTasks = array( | $findTasks = array( | |||
'stateID' => self::getProgressState(), | 'stateID' => self::getProgressState(), | |||
'storagenodeID' => $this->get('id'), | 'storagenodeID' => $this->get('id'), | |||
'typeID' => array_diff($this->get('usedtasks'), $multicastTaskID), | 'typeID' => $usedtasks, | |||
); | ); | |||
$countTasks = self::getClass('TaskManager')->count($findTasks); | $countTasks = self::getClass('TaskManager')->count($findTasks); | |||
$index = array_search(8, $usedtasks); | $index = array_search(8, $usedtasks); | |||
if ($index === false) { | if ($index === false) { | |||
return $countTasks; | return $countTasks; | |||
} | } | |||
$MulticastCount = self::getSubObjectIDs( | $MulticastCount = self::getSubObjectIDs( | |||
'MulticastSession', | 'MulticastSession', | |||
array( | array( | |||
'stateID' => self::getProgressState() | 'stateID' => self::getProgressState() | |||
skipping to change at line 337 | skipping to change at line 336 | |||
return $countTasks; | return $countTasks; | |||
} | } | |||
/** | /** | |||
* Gets the queued hosts on this node. | * Gets the queued hosts on this node. | |||
* | * | |||
* @return int | * @return int | |||
*/ | */ | |||
public function getQueuedSlotCount() | public function getQueuedSlotCount() | |||
{ | { | |||
$countTasks = 0; | $countTasks = 0; | |||
$multicastTaskID = array(8); | ||||
$usedtasks = $this->get('usedtasks'); | $usedtasks = $this->get('usedtasks'); | |||
$findTasks = array( | $findTasks = array( | |||
'stateID' => self::getQueuedStates(), | 'stateID' => self::getQueuedStates(), | |||
'storagenodeID' => $this->get('id'), | 'storagenodeID' => $this->get('id'), | |||
'typeID' => array_diff($this->get('usedtasks'), $multicastTaskID), | 'typeID' => $usedtasks, | |||
); | ); | |||
$countTasks = self::getClass('TaskManager')->count($findTasks); | $countTasks = self::getClass('TaskManager')->count($findTasks); | |||
$index = array_search(8, $usedtasks); | $index = array_search(8, $usedtasks); | |||
if ($index === false) { | if ($index === false) { | |||
return $countTasks; | return $countTasks; | |||
} | } | |||
$MulticastCount = self::getSubObjectIDs( | $MulticastCount = self::getSubObjectIDs( | |||
'MulticastSession', | 'MulticastSession', | |||
array('stateID' => self::getQueuedStates()), | array('stateID' => self::getQueuedStates()), | |||
'msID' | 'msID' | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 2 lines changed or added |