MCPcopy
hub / github.com/pyload/pyload / extract_queued

Method extract_queued

module/plugins/hooks/ExtractArchive.py:161–182  ·  view source on GitHub ↗
(self, thread)

Source from the content-addressed store, hash-verified

159
160 @threaded
161 def extract_queued(self, thread):
162 # @NOTE: doing the check here for safety (called by coreReady)
163 if self.extracting:
164 return
165
166 self.extracting = True
167
168 packages = self.queue.get()
169 while packages:
170 if self.last_package: #: Set by self.all_downloads_processed()
171 self.last_package = False
172 if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now
173 self.manager.dispatchEvent("all_archives_extracted")
174 self.manager.dispatchEvent("all_archives_processed")
175
176 else:
177 if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now
178 pass
179
180 packages = self.queue.get() #: Check for packages added during extraction
181
182 self.extracting = False
183
184 #: Deprecated method, use `extract_package` instead
185 @Expose

Callers 4

activateMethod · 0.95
extract_packageMethod · 0.95
package_finishedMethod · 0.95

Calls 3

extractMethod · 0.95
dispatchEventMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected