diff options
author | Bruno Wagner <bwagner@thoughtworks.com> | 2014-09-15 16:20:20 -0300 |
---|---|---|
committer | Bruno Wagner <bwagner@thoughtworks.com> | 2014-09-15 16:20:20 -0300 |
commit | 65a4eb20889ee8a58216979b90bb442453ef68f8 (patch) | |
tree | 4cf076484d270557db7f4cfe0844654ab598c3ab | |
parent | 80f973cb363f6fe938828172b4d756e923639187 (diff) |
Changed loaded to autoload now it will only autoload if the environment variable AUTOLOAD is set to True
-rw-r--r-- | py-fake-service/app/pixelated_user_agent.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py-fake-service/app/pixelated_user_agent.py b/py-fake-service/app/pixelated_user_agent.py index 73a6dc3a..5931bce5 100644 --- a/py-fake-service/app/pixelated_user_agent.py +++ b/py-fake-service/app/pixelated_user_agent.py @@ -28,7 +28,7 @@ MEDIUM_TAGGED_URL = 'https://static.wazokazi.is/py-mediumtagged.tar.gz' client = None converter = None account = None -loaded = False +autoload = os.environ.get('AUTOLOAD', False) mail_service = MailService() @@ -180,10 +180,10 @@ def load_mailset(mailset): @app.route('/') def index(): - global loaded - if not loaded: + global autoload + if autoload: load_mailset('mediumtagged') - loaded = True + autoload = False return app.send_static_file('index.html') |