Improved start (async/await)#6
Conversation
|
This looks interesting. Do we really need to use async/await here? It'd be the only place in this code base that raises overall minimum requirement to Node.js 8. |
|
Not really, regular As another thought, isolatedVM only compiles for newer node versions last I tried, is that not going to be setting a hard requirement for Node 8 then? |
|
Due to better performance, and the fact that node8 is the current LTS version, we've already been recommending to people in slack who are running their own servers to use node8. I believe some of the community mods are also targeting node8 and are ignoring backwards compatibility. I really don't think changing this will disrupt much. |
* Use async/await, this simplifies some of the code * Added log_console option, forwards console messages to terminal * Changed logs to use a rotating log rather than timestamps, this makes finding the most recent log much easier. (log_rotate_keep (default 5) controls how many to keep) * Added a storage_enabled option (default true), this allows storage to be disabled when using a mod such as screepsmod-mongo * Added restart_interval (default 3600). This is the interval before runner and processors get restarted.
48d7ba5 to
99c611d
Compare
|
Rebased on current launcher master branch |
This is an improved version of the
startpart of the launcher.It adds a few helpful features (forwarding console to terminal, better logging structure)
And also adds a few performance improving features (restart interval for runners/processors, option to disable storage when using alternative storage mods)
With Node 8, async/await runs natively, the code is restructured slightly to use them, this simplified some of the code and in general makes promises easier to work with. (I can try refactoring into a PR without async/await if this isn't desirable)