... |
... |
@@ -283,6 +283,7 @@ class ContentsWriter(object): |
283
|
283
|
to all 'touchable' suites if not specified explicitely. Untouchable
|
284
|
284
|
suites will be included if the force argument is set to True.
|
285
|
285
|
'''
|
|
286
|
+ pool = DakProcessPool()
|
286
|
287
|
class_.logger = logger
|
287
|
288
|
session = DBConn().session()
|
288
|
289
|
suite_query = session.query(Suite)
|
... |
... |
@@ -297,7 +298,6 @@ class ContentsWriter(object): |
297
|
298
|
suite_query = suite_query.filter(Suite.untouchable == False) # noqa:E712
|
298
|
299
|
deb_id = get_override_type('deb', session).overridetype_id
|
299
|
300
|
udeb_id = get_override_type('udeb', session).overridetype_id
|
300
|
|
- pool = DakProcessPool()
|
301
|
301
|
|
302
|
302
|
# Lock tables so that nobody can change things underneath us
|
303
|
303
|
session.execute("LOCK TABLE bin_contents IN SHARE MODE")
|
... |
... |
@@ -360,13 +360,13 @@ class BinaryContentsScanner(object): |
360
|
360
|
argument. Returns the number of processed and remaining packages as a
|
361
|
361
|
dict.
|
362
|
362
|
'''
|
|
363
|
+ pool = DakProcessPool()
|
363
|
364
|
session = DBConn().session()
|
364
|
365
|
query = session.query(DBBinary).filter(DBBinary.contents == None) # noqa:E711
|
365
|
366
|
remaining = query.count
|
366
|
367
|
if limit is not None:
|
367
|
368
|
query = query.limit(limit)
|
368
|
369
|
processed = query.count()
|
369
|
|
- pool = DakProcessPool()
|
370
|
370
|
for binary in query.yield_per(100):
|
371
|
371
|
pool.apply_async(binary_scan_helper, (binary.binary_id, ))
|
372
|
372
|
pool.close()
|
... |
... |
@@ -479,13 +479,13 @@ class SourceContentsScanner(object): |
479
|
479
|
argument. Returns the number of processed and remaining packages as a
|
480
|
480
|
dict.
|
481
|
481
|
'''
|
|
482
|
+ pool = DakProcessPool()
|
482
|
483
|
session = DBConn().session()
|
483
|
484
|
query = session.query(DBSource).filter(DBSource.contents == None) # noqa:E711
|
484
|
485
|
remaining = query.count
|
485
|
486
|
if limit is not None:
|
486
|
487
|
query = query.limit(limit)
|
487
|
488
|
processed = query.count()
|
488
|
|
- pool = DakProcessPool()
|
489
|
489
|
for source in query.yield_per(100):
|
490
|
490
|
pool.apply_async(source_scan_helper, (source.source_id, ))
|
491
|
491
|
pool.close()
|