Fixed Storage Full for S001
This commit is contained in:
15
storage.py
15
storage.py
@@ -408,7 +408,7 @@ class ISOServer (IPKT, SCLS, TQUI):
|
||||
|
||||
ymax = int (self.parameter['Y_%s' % storage])
|
||||
unusableslots = DB_con.getunusableslots (storage)
|
||||
self.log (repr (unusableslots))
|
||||
self.log ("Unusable Slots: %s" % repr (unusableslots))
|
||||
|
||||
#Specific code for multiple zones
|
||||
mid = (int (self.parameter.get('XMid_%s_%d' % (storage, zone) , 1)),\
|
||||
@@ -417,7 +417,7 @@ class ISOServer (IPKT, SCLS, TQUI):
|
||||
self.message (5, ' findstorageplace : search x from %d to %d with mid x:%d y:%d' %(xmin, xmax, mid[0], mid[1]))
|
||||
slots = [(x, y) for x in range (xmin, xmax + 1) for y in range (1, ymax + 1) if (not usedslots or ((x, y) not in usedslots)) and (not unusableslots or ((storage, x, y) not in unusableslots))]
|
||||
slots.sort (lambda arg1, arg2: cmp (pow (arg1[0] - mid[0], 2) + pow (arg1[1] - mid[1], 2), pow (arg2[0] - mid[0], 2) + pow (arg2[1] - mid[1], 2)))
|
||||
self.log (repr (slots))
|
||||
self.log ("Remaining Slots: %s" % repr (slots))
|
||||
if len (slots) >= 1:
|
||||
self.message (6, ' findstorageplace : using x %d y %d' %(slots[0][0], slots[0][1]))
|
||||
return ((slots[0][0], slots[0][1], 1), len (slots))
|
||||
@@ -666,11 +666,20 @@ class ISOServer (IPKT, SCLS, TQUI):
|
||||
|
||||
else:
|
||||
self.message (3, " boxreserve : article not in Storage (or not Throughfeed) yet -> try to find a place")
|
||||
inqsize = DB_con.getinqueuesize (storage)
|
||||
|
||||
|
||||
place, emptyslots = self.findstorageplace (storage, article)
|
||||
if not place:
|
||||
self.message (3, " boxreserve : No Place in Storage return and maybe get another place")
|
||||
return None
|
||||
if storage in ['S001', 'S002']:
|
||||
self.message (3, " boxreserve : Singleplace Storage check remaining Space %d against queuesize %d" % (emptyslots, inqsize))
|
||||
if emptyslots <= inqsize:
|
||||
self.message (3, " boxreserve : Singleplace Storage does not have enough space")
|
||||
return None
|
||||
|
||||
|
||||
|
||||
#Do boxreservatoion
|
||||
self.message (3, " boxreserve : Box Found Place in Storage %s " % storage + str (place))
|
||||
@@ -999,7 +1008,7 @@ class ISOServer (IPKT, SCLS, TQUI):
|
||||
mailexplog (job, explog)
|
||||
except:
|
||||
print ('Problem')
|
||||
elif __sentcount[0] == 0 and _count[0] == 0:
|
||||
elif _sentcount[0] == 0 and _count[0] == 0:
|
||||
#FixMe just RBG 2 at the moment
|
||||
if _source == 'T001':
|
||||
self.message (3, "Exp: Check Article From T001 due to no Move Job active")
|
||||
|
||||
Reference in New Issue
Block a user