Commit 4730e024 authored by Georgios Dagkakis's avatar Georgios Dagkakis

control so that if a full batch is set as WIP to first station it is not...

control so that if a full batch is set as WIP to first station it is not created (source will do it anyway)
parent cb32d681
...@@ -171,29 +171,31 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -171,29 +171,31 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
def createSubBatch(self,data,stationId,parentBatchId,parentBatchName,subBatchId,numberOfUnits, def createSubBatch(self,data,stationId,parentBatchId,parentBatchName,subBatchId,numberOfUnits,
unitsToProcess=0,receiver=None): unitsToProcess=0,receiver=None):
# print 'creating sub-batch',stationId,parentBatchId,receiver # print 'creating sub-batch',stationId,parentBatchId,receiver
data['graph']['node'][stationId]['wip'].insert(0,{ if stationId:
"_class": 'Dream.SubBatch', data['graph']['node'][stationId]['wip'].insert(0,{
"id": parentBatchId+'_SB_'+str(subBatchId)+'_wip', "_class": 'Dream.SubBatch',
"name":parentBatchName+'_SB_'+str(subBatchId)+'_wip', "id": parentBatchId+'_SB_'+str(subBatchId)+'_wip',
"numberOfUnits":numberOfUnits, "name":parentBatchName+'_SB_'+str(subBatchId)+'_wip',
"unitsToProcess": unitsToProcess, "numberOfUnits":numberOfUnits,
"parentBatchId":parentBatchId, "unitsToProcess": unitsToProcess,
"parentBatchName":parentBatchName, "parentBatchId":parentBatchId,
"receiver":receiver "parentBatchName":parentBatchName,
} "receiver":receiver
) }
)
# creates a batch in a station # creates a batch in a station
def createBatch(self,data,stationId,batchId,batchName,numberOfUnits,unitsToProcess=0): def createBatch(self,data,stationId,batchId,batchName,numberOfUnits,unitsToProcess=0):
# print 'creating batch',stationId,batchId,numberOfUnits # print 'creating batch',stationId,batchId,numberOfUnits
data['graph']['node'][stationId]['wip'].insert(0,{ if stationId:
"_class": 'Dream.Batch', data['graph']['node'][stationId]['wip'].insert(0,{
"id": batchId+'_wip', "_class": 'Dream.Batch',
"name":batchName+'_wip', "id": batchId+'_wip',
"numberOfUnits":numberOfUnits, "name":batchName+'_wip',
"unitsToProcess": unitsToProcess, "numberOfUnits":numberOfUnits,
} "unitsToProcess": unitsToProcess,
) }
)
# gets the data and a station id and returns a list with all the stations that the station may share batches # gets the data and a station id and returns a list with all the stations that the station may share batches
def findSharingStations(self,data,stationId): def findSharingStations(self,data,stationId):
......
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