Commit feb40121 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Operator to be able to lock and not undertake jobs when near the end of shift

parent 8b67f2bd
......@@ -56,13 +56,15 @@ class ObjectResource(ManPyObject):
self.coreObjectIds=[]
# list with the coreObjects that the resource services
self.coreObjects=[]
# flag that locks the resource so that it cannot get new jobs
self.isLocked=False
# =======================================================================
# checks if the worker is available
# =======================================================================
def checkIfResourceIsAvailable(self,callerObject=None):
# return true if the operator is idle and on shift
return len(self.Res.users)<self.capacity and self.onShift
return len(self.Res.users)<self.capacity and self.onShift and (not self.isLocked)
# =======================================================================
......
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