Implement a set of modifications to allow attributeDisplay to directly

query attributes, this is always slower then using the normal method
except for the marketBrowser.
This commit is contained in:
cncfanatics
2010-12-06 09:47:30 +01:00
parent a5e0059a4f
commit 570c5a9a0c
5 changed files with 40 additions and 8 deletions

View File

@@ -25,6 +25,8 @@ import threading
from sqlalchemy.orm.exc import NoResultFound
import Queue
import traceback
import sqlalchemy.sql
import sqlalchemy.orm
class ShipBrowserWorkerThread(threading.Thread):
def run(self):
@@ -334,3 +336,12 @@ class Market():
eos.db.commit()
self.priceWorkerThread.trigger(requests, cb)
def directRequest(self, items, attrID):
itemIDs = map(lambda i: i.ID, items)
info = {}
for ID, val in eos.db.directAttributeRequest(itemIDs, attrID):
info[ID] = val
return info