redundant code commented and comments refinement

parent 5a64e582
...@@ -360,7 +360,7 @@ class Machine(CoreObject): ...@@ -360,7 +360,7 @@ class Machine(CoreObject):
self.releaseOperator() self.releaseOperator()
yield waituntil,self,self.broker.brokerIsSet yield waituntil,self,self.broker.brokerIsSet
# if there is a failure in the machine it is passivated # if there is a failure in the machine or interruption due to preemption, it is passivated
yield passivate,self yield passivate,self
# use the timers to count the time that Machine is down and related # use the timers to count the time that Machine is down and related
self.downTimeProcessingCurrentEntity+=now()-breakTime # count the time that Machine is down while processing this Entity self.downTimeProcessingCurrentEntity+=now()-breakTime # count the time that Machine is down while processing this Entity
......
...@@ -178,19 +178,19 @@ class MachineManagedJob(MachineJobShop): ...@@ -178,19 +178,19 @@ class MachineManagedJob(MachineJobShop):
# maybe we should work this way in all CoreObjects??? # maybe we should work this way in all CoreObjects???
return self.entityToGet return self.entityToGet
# ======================================================================= # # =======================================================================
# checks if the object is ready to receive an Entity # # checks if the object is ready to receive an Entity
# ======================================================================= # # =======================================================================
def isReadyToGet(self): # def isReadyToGet(self):
# check if the entity that is about to be obtained has a manager (this should be true for this object) # # check if the entity that is about to be obtained has a manager (this should be true for this object)
if self.entityToGet.manager: # if self.entityToGet.manager:
manager=self.entityToGet.manager # manager=self.entityToGet.manager
if len(manager.activeCallersList)>0: # if len(manager.activeCallersList)>0:
manager.sortEntities() # sort the callers of the manager to be used for scheduling rules # manager.sortEntities() # sort the callers of the manager to be used for scheduling rules
# return true if the manager is available # # return true if the manager is available
return manager.checkIfResourceIsAvailable() # return manager.checkIfResourceIsAvailable()
else: # else:
return True # return True
# ======================================================================= # =======================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment