diff --git a/eos b/eos index 598ecb4f2..70dba488f 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit 598ecb4f267124fafceb9096569bb7cb732d1e30 +Subproject commit 70dba488f73339989d6b69a18e8d5e193760e44a diff --git a/service/__init__.py b/service/__init__.py index a1a5681ac..acb3d6854 100644 --- a/service/__init__.py +++ b/service/__init__.py @@ -2,3 +2,4 @@ from service.market import Market from service.fit import Fit from service.attribute import Attribute from service.character import Character +import service.prefetch \ No newline at end of file diff --git a/service/prefetch.py b/service/prefetch.py new file mode 100755 index 000000000..940558034 --- /dev/null +++ b/service/prefetch.py @@ -0,0 +1,36 @@ +#=============================================================================== +# Copyright (C) 2010 Diego Duclos +# +# This file is part of pyfa. +# +# pyfa is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# pyfa is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with pyfa. If not, see . +#=============================================================================== + +import threading +import service +import eos.db + +class PrefetchThread(threading.Thread): + def run(self): + print "skillList" + eos.db.getItemsByCategory("Skill", eager=("effects", "attributes")) + cMarket = service.Market.getInstance() + root = cMarket.getShipRoot() + for id, _ in root: + print "id" + cMarket.getShipList(id) + +prefetch = PrefetchThread() +prefetch.daemon = True +prefetch.start() \ No newline at end of file