dak/show_new.py: set examine_package.use_html before creating worker pool

We want examine_package.use_html to be set everywhere. So we have to
change it before we create the worker pool.

This was broken by 24cb4fe2 where the
worker pool was setup earlier.
上级 a7f77393
...@@ -249,14 +249,13 @@ def init(session): ...@@ -249,14 +249,13 @@ def init(session):
################################################################################ ################################################################################
def main(): def main():
examine_package.use_html = True
pool = DakProcessPool(processes=5) pool = DakProcessPool(processes=5)
session = DBConn().session() session = DBConn().session()
upload_ids = [ u.id for u in init(session) ] upload_ids = [ u.id for u in init(session) ]
session.close() session.close()
examine_package.use_html=1
p = pool.map_async(do_pkg, upload_ids) p = pool.map_async(do_pkg, upload_ids)
pool.close() pool.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册