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:
|
else:
|
||||||
dispatch = dispatcher.MultiprocessingDispatcher(
|
dispatch = dispatcher.MultiprocessingDispatcher(
|
||||||
local_procs=config['processes'])
|
local_procs=config['processes'])
|
||||||
if platform.system() == 'Windows' or not sys.stderr.isatty():
|
dispatch.render_all(tilesets, config['observer'])
|
||||||
obs = observer.LoggingObserver()
|
|
||||||
else:
|
|
||||||
obs = observer.ProgressBarObserver()
|
|
||||||
dispatch.render_all(tilesets, obs)
|
|
||||||
dispatch.close()
|
dispatch.close()
|
||||||
|
|
||||||
assetMrg.finalize(tilesets)
|
assetMrg.finalize(tilesets)
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
from settingsValidators import *
|
from settingsValidators import *
|
||||||
import util
|
import util
|
||||||
|
from observer import ProgressBarObserver, LoggingObserver
|
||||||
|
|
||||||
# renders is a dictionary mapping strings to dicts. These dicts describe the
|
# renders is a dictionary mapping strings to dicts. These dicts describe the
|
||||||
# configuration for that render. Therefore, the validator for 'renders' is set
|
# 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
|
# memcached is an option, but unless your IO costs are really high, it just
|
||||||
# ends up adding overhead and isn't worth it.
|
# ends up adding overhead and isn't worth it.
|
||||||
memcached_host = Setting(required=False, validator=str, default=None)
|
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