MCPcopy
hub / github.com/tonquer/JMComic-qt / Run

Method Run

src/task/task_qimage.py:31–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 self.thread.start()
30
31 def Run(self):
32 while True:
33 try:
34 v = self._inQueue.get(True)
35 if v == "":
36 break
37 taskId = v
38 except Exception as es:
39 continue
40 self._inQueue.task_done()
41
42 if taskId < 0:
43 break
44
45 try:
46 info = self.tasks.get(taskId)
47 if not info:
48 continue
49
50 if not info.data:
51 return
52 if isinstance(info.saveParams, tuple) and len(info.saveParams) > 1:
53 epsId, scrambleId, pitureName = info.saveParams
54 info.data = TaskMulti().GetJmPicResultsResult(info.data, epsId, scrambleId, pitureName)
55 newQ = self.ConverQImage(info)
56
57 except Exception as es:
58 Log.Error(es)
59 finally:
60 self.taskObj.imageBack.emit(taskId, newQ)
61
62 @time_me
63 def ConverQImage(self, info):

Callers

nothing calls this directly

Calls 5

ConverQImageMethod · 0.95
TaskMultiClass · 0.90
GetJmPicResultsResultMethod · 0.80
ErrorMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected