Mercurial > piecrust2
comparison piecrust/baking/worker.py @ 871:504ddb370df8
refactor: Fixing some issues with baking assets.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 13 Jun 2017 22:30:27 -0700 |
parents | 8d25f76fce98 |
children | d1095774bfcf |
comparison
equal
deleted
inserted
replaced
870:48d25fd68b8d | 871:504ddb370df8 |
---|---|
35 def initialize(self): | 35 def initialize(self): |
36 # Create the app local to this worker. | 36 # Create the app local to this worker. |
37 app = self.ctx.appfactory.create() | 37 app = self.ctx.appfactory.create() |
38 app.config.set('baker/is_baking', True) | 38 app.config.set('baker/is_baking', True) |
39 app.config.set('baker/worker_id', self.wid) | 39 app.config.set('baker/worker_id', self.wid) |
40 app.config.set('site/base_asset_url_format', '%uri') | 40 app.config.set('site/asset_url_format', '%page_uri%/%filename%') |
41 | 41 |
42 app.env.fs_cache_only_for_main_page = True | 42 app.env.fs_cache_only_for_main_page = True |
43 | 43 |
44 stats = app.env.stats | 44 stats = app.env.stats |
45 stats.registerTimer("BakeWorker_%d_Total" % self.wid) | 45 stats.registerTimer("BakeWorker_%d_Total" % self.wid) |