Mercurial > piecrust2
diff piecrust/environment.py @ 1153:a9a592f655e3
config: Add setting for enabling baking or serving posts in the future.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 19 Jan 2019 17:41:30 -0800 |
parents | 1857dbd4580f |
children |
line wrap: on
line diff
--- a/piecrust/environment.py Sat Jan 19 17:40:13 2019 -0800 +++ b/piecrust/environment.py Sat Jan 19 17:41:30 2019 -0800 @@ -1,5 +1,6 @@ import time import logging +import datetime import contextlib @@ -79,6 +80,7 @@ self.app = None self.start_time = None + self.start_datetime = None self.was_cache_cleaned = False self.page_repository = MemCache() self.rendered_segments_repository = MemCache() @@ -94,6 +96,7 @@ def initialize(self, app): self.app = app self.start_time = time.perf_counter() + self.start_datetime = datetime.datetime.now() self.rendered_segments_repository.fs_cache = \ app.cache.getCache('renders')