Merge pull request #10577 from ic4f/dev_uwsgi_debug_mode

Set uwsgi's honour-stdin option when in debug mode
This commit is contained in:
Dannon
2020-10-28 15:39:30 -04:00
committed by GitHub
4 changed files with 21 additions and 0 deletions
+5
View File
@@ -2388,6 +2388,11 @@
use_printdebug. It also causes the files used by PBS/SGE
(submission script, output, and error) to remain on disk after the
job is complete.
In addition, this will set uWSGI's `honour-stdin` option to
`true`; thus, preventing uWSGI from remapping stdin to `/dev/null`
and enabling debugging with tools like pdb. To keep uWSGI's
default setting, set `honor-stdin` to `false` in the `uwsgi`
section of this configuration file.
:Default: ``false``
:Type: bool
@@ -1217,6 +1217,11 @@ galaxy:
# use_printdebug. It also causes the files used by PBS/SGE
# (submission script, output, and error) to remain on disk after the
# job is complete.
# In addition, this will set uWSGI's `honour-stdin` option to `true`;
# thus, preventing uWSGI from remapping stdin to `/dev/null` and
# enabling debugging with tools like pdb. To keep uWSGI's default
# setting, set `honor-stdin` to `false` in the `uwsgi` section of this
# configuration file.
#debug: false
# Check for WSGI compliance.
@@ -1731,6 +1731,12 @@ mapping:
causes the files used by PBS/SGE (submission script, output, and error)
to remain on disk after the job is complete.
In addition, this will set uWSGI's `honour-stdin` option to `true`;
thus, preventing uWSGI from remapping stdin to `/dev/null` and
enabling debugging with tools like pdb. To keep uWSGI's default
setting, set `honor-stdin` to `false` in the `uwsgi` section of this
configuration file.
use_lint:
type: bool
default: false
+5
View File
@@ -118,6 +118,11 @@ def _get_uwsgi_args(cliargs, kwargs):
# We always want to append client/src/assets as static-safe.
__add_arg(args, 'static-safe', f'{os.getcwd()}/client/src/assets')
# Do not let uwsgi remap stdin to /dev/null if galaxy is in debug mode
galaxy_kwargs = load_app_properties(config_file=config_file, config_section='galaxy')
if __arg_set('debug', galaxy_kwargs) and not __arg_set('honour-stdin', uwsgi_kwargs):
__add_arg(args, 'honour-stdin', True)
for arg in DEFAULT_ARGS['_all_'] + DEFAULT_ARGS[cliargs.app]:
if not __arg_set(arg, uwsgi_kwargs):
__add_arg(args, arg, defaults[arg])