Skip to content

Commit

Permalink
fix: avoid exiting the server when encountering errors on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Aug 16, 2021
1 parent f0686a4 commit c22f3ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions grow/server/manager.py
Expand Up @@ -27,9 +27,11 @@ def server_activate(self):
with timer.Timer() as router_time:
try:
self.pod.router.add_all(concrete=False)
except bulk_errors.BulkErrors as err:
bulk_errors.display_bulk_errors(err)
sys.exit(-1)
except Exception:
logging.exception('Error encountered starting server.')
# Do not exit the process here; the server should remain active
# so the developer can fix any issues related to the router,
# without needing to manually restart the server.
self.pod.logger.info('{} routes built in {:.3f} s'.format(
len(self.pod.router.routes), router_time.secs))

Expand Down

0 comments on commit c22f3ff

Please sign in to comment.