make observer a setting, need to update docs
This commit is contained in:
@@ -397,11 +397,7 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
||||
else:
|
||||
dispatch = dispatcher.MultiprocessingDispatcher(
|
||||
local_procs=config['processes'])
|
||||
if platform.system() == 'Windows' or not sys.stderr.isatty():
|
||||
obs = observer.LoggingObserver()
|
||||
else:
|
||||
obs = observer.ProgressBarObserver()
|
||||
dispatch.render_all(tilesets, obs)
|
||||
dispatch.render_all(tilesets, config['observer'])
|
||||
dispatch.close()
|
||||
|
||||
assetMrg.finalize(tilesets)
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
from settingsValidators import *
|
||||
import util
|
||||
from observer import ProgressBarObserver, LoggingObserver
|
||||
|
||||
# renders is a dictionary mapping strings to dicts. These dicts describe the
|
||||
# configuration for that render. Therefore, the validator for 'renders' is set
|
||||
@@ -93,3 +94,8 @@ processes = Setting(required=True, validator=int, default=-1)
|
||||
# memcached is an option, but unless your IO costs are really high, it just
|
||||
# ends up adding overhead and isn't worth it.
|
||||
memcached_host = Setting(required=False, validator=str, default=None)
|
||||
|
||||
if platform.system() == 'Windows' or not sys.stderr.isatty():
|
||||
observer = LoggingObserver()
|
||||
else:
|
||||
observer = ProgressBarObserver()
|
||||
|
||||
Reference in New Issue
Block a user