MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / processRequests

Method processRequests

service/market.py:66–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 self.processRequests()
65
66 def processRequests(self):
67 queue = self.queue
68 cache = self.cache
69 sMkt = Market.getInstance()
70 while True:
71 if not self.running:
72 break
73 try:
74 id_, callback = queue.get()
75 set_ = cache.get(id_)
76 if set_ is None:
77 set_ = sMkt.getShipList(id_)
78 cache[id_] = set_
79
80 wx.CallAfter(callback, (id_, set_))
81 except (KeyboardInterrupt, SystemExit):
82 raise
83 except Exception as e:
84 pyfalog.critical("Callback failed.")
85 pyfalog.critical(e)
86 finally:
87 try:
88 queue.task_done()
89 except (KeyboardInterrupt, SystemExit):
90 raise
91 except Exception as e:
92 pyfalog.critical("Queue task done failed.")
93 pyfalog.critical(e)
94
95 def stop(self):
96 self.running = False

Callers 1

runMethod · 0.95

Calls 3

getShipListMethod · 0.80
getInstanceMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected