Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Conversation

@giocalitri
Copy link
Contributor

part of #8

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.801% when pulling ddd25a0 on gdm_some_updates into 4983f2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.801% when pulling ddd25a0 on gdm_some_updates into 4983f2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 98.844% when pulling 7a99d6d on gdm_some_updates into 4983f2d on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.805% when pulling d18ec7b on gdm_some_updates into 4983f2d on master.

Copy link

@gsidebo gsidebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple comments



def configure_logging(level_override=None):
class Config(object):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: have you removed the ability to configure the app via a JSON file, and now it's only possible to configure via OS environment variables? I personally find JSON config a lot easier to manage. Seems like we could have both if we attempted to load a JSON file from some path(s) before defining this class, then adding a helper method that tries to get the value from the OS environment, then the JSON config file dict if that doesn't exist, then a default value if that doesn't exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked about it with Tobias and he agreed on the change

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

'%(filename)s:%(lineno)d - '
'{hostname}- %(message)s').format(hostname=HOSTNAME)
LOG_FILE_PATH = os.environ.get('LOG_FILE_PATH', '')
SUBPROCESS_TIMEOUT = int(os.environ.get('SUBPROCESS_TIMEOUT', 60)) * MINUTE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably help to call this variable SUBPROCESS_TIMEOUT_MINUTES or something. I typically assume that a timeout value is in seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point: I'll change that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change only the environment variable name and keep the config one as is, given that I translate that in seconds.

@gsidebo gsidebo self-assigned this Oct 24, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.805% when pulling fb4ac09 on gdm_some_updates into 4983f2d on master.

@giocalitri
Copy link
Contributor Author

@gsidebo Done

Copy link

@gsidebo gsidebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@giocalitri giocalitri merged commit d69cb3e into master Oct 24, 2017
@giocalitri giocalitri deleted the gdm_some_updates branch October 24, 2017 16:47
@pdpinch
Copy link
Member

pdpinch commented Oct 25, 2017

The PR has been merged. How/can we release this @mitodl/devops ?

@shaidar
Copy link

shaidar commented Oct 25, 2017

This will be part of the AMI build that I'm currently working on and should have in QA today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants