Commit graph

23 commits

Author SHA1 Message Date
Dave Shawley
7991f99807 Make shutdown timings configurable. 2019-09-02 08:01:09 -04:00
Andrew Rabert
11bc7079c0 Remove explicit object inheritance 2018-11-26 19:03:37 -05:00
Andrew Rabert
234fb6d479 Support only tornado>=5.0
- Drop support for all versions of tornado prior to 5.0. This negates
the need for version-aware conditionals that previous existed.
- Update tox to test Tornado 5.0 and the unpinned latest version.
2018-11-26 19:03:37 -05:00
Dave Shawley
3321987dfc Runner: remove logging from signal handler.
It turns out that logging.Logger SHOULD NOT be used in signal handlers.
We are running into this elsewhere in the system so that is absolutely
no reason to risk it here.

ref: https://docs.python.org/3/library/logging.html#thread-safety
2018-03-15 07:34:09 -04:00
Dave Shawley
473f2f2de0 Install flake8 for development. 2018-01-29 07:18:58 -05:00
Dave Shawley
fb909088d9 Enable reuse_port option to HTTPServer.bind.
This makes solutions that restart the process (e.g., envconsul) work
properly.  Without port reuse, you will get a very unpleasant "port
already in use" when the service restarts.

This requires Tornado >= 4.4
2018-01-28 14:32:41 -05:00
Brian Korty
4109dd3885 Support max_body_size and max_buffer_size.
Allow max_body_size and max_buffer_size settings to be passed into the
underlying Tornado HTTPServer to override the default settings.
2018-01-24 20:07:12 -05:00
Dave Shawley
d7370ab5e6 Rename CallbackManager.run to start.
It was too easy to confuse this with Runner.run
2016-11-03 07:43:23 -04:00
Dave Shawley
531b796559 Add sprockets.http.app module.
This module separates out the application state management from the
mechanics of running the application.  The former is destined for a
sub-class of tornado.web.Application (as app.Application) and the
latter remains in sprockets.http.runner.
2016-11-01 22:01:27 -04:00
Gavin M. Roy
03b3f9d0d5 Remove the hook on startup and sprockets.logging 2016-08-29 16:12:51 -04:00
Dave Shawley
160a3c70dd Appease flake8. 2016-06-13 23:23:46 -04:00
Dave Shawley
2f263b0997 Add `httprun` distutils command. 2016-06-13 23:23:17 -04:00
Gavin M. Roy
d17c668f83 Add async shutdown support an on_start callbacks 2016-03-10 17:10:31 -05:00
Kelly O'Brien
0f819f2313 Allow xheaders to be passed in the settings
This will tell Tornado to use headers like X-Real-IP to get the user’s IP address instead of attributing all traffic to the lbl’s IP address.
2016-02-23 11:39:52 -05:00
Dave Shawley
f3bfb0bd28 Delay grabbing the IOLoop until after fork. 2016-02-15 13:01:16 -05:00
Dave Shawley
03e85b440c Call sys.exit() when a before_run callback raises an exception. 2016-01-28 07:53:01 -05:00
Dave Shawley
a1ba8874f6 Add support for `before_run` callbacks. 2016-01-27 18:24:02 -05:00
Dave Shawley
2d043ff752 Move _get_logging_config into sprockets.http. 2015-12-10 10:44:52 -05:00
Dave Shawley
557989399c Move logging.config.dictConfig into http.run. 2015-12-10 10:41:59 -05:00
Dave Shawley
1cd8ef8fe0 Add support application.settings['number_of_procs']. 2015-09-24 15:01:20 -04:00
Dave Shawley
b5decd1aec Add application shutdown callbacks. 2015-09-24 14:56:51 -04:00
Dave Shawley
da0a9f5a8f Set the log_function in Runner.start_server. 2015-08-28 10:57:06 -04:00
Dave Shawley
f9645b0025 Add sprockets.http.run. 2015-07-22 14:11:32 -04:00