from daklib.config import Config
from daklib import daklog
from daklib.changesutils import *
-from daklib.threadpool import ThreadPool
+from daklib.dakmultiprocessing import Pool
# Globals
Cnf = None
sources.add(htmlname)
htmlfile = os.path.join(cnf["Show-New::HTMLPath"], htmlname)
- if os.path.exists(htmlfile) and
+ if os.path.exists(htmlfile) and \
os.stat(htmlfile).st_mtime > os.stat(origchanges).st_mtime:
session.close()
return
u.check_source_against_db(deb_filename, session)
u.pkg.changes["suite"] = u.pkg.changes["distribution"]
- new, byhand = determine_new(u.pkg.changes_file, u.pkg.changes, files, 0, session)
+ new, byhand = determine_new(u.pkg.changes_file, u.pkg.changes, files, 0, dsc=u.pkg.dsc, session=session)
outfile = open(os.path.join(cnf["Show-New::HTMLPath"],htmlname),"w")
examine_package.use_html=1
- threadpool = ThreadPool()
+ pool = Pool()
for changes_file in changes_files:
changes_file = utils.validate_changes_file_arg(changes_file, 0)
if not changes_file:
continue
print "\n" + changes_file
- threadpool.queueTask(do_pkg, changes_file)
- threadpool.joinAll()
+ pool.apply_async(do_pkg, (changes_file,))
+ pool.close()
+ pool.join()
files = set(os.listdir(cnf["Show-New::HTMLPath"]))
to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources))