Skip to content

Commit

Permalink
#104 Add ability to reload config without restarting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose committed Aug 13, 2019
1 parent 28098af commit 5fe6101
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch

## [Unreleased](https://github.com/idealista/prom2teams/tree/develop)
## Added
- *[#104](https://github.com/idealista/prom2teams/issues/104) Add ability to reload config without restarting* @jnogol @miguel-chacon
- *[#129](https://github.com/idealista/prom2teams/issues/129) Add prometheus_flask_exporter* @jnogol
## Changed
- *[#128](https://github.com/idealista/prom2teams/pull/128) Allow overriding the config file location in Docker by setting the APP_CONFIG_FILE environment variable* @nvx
Expand Down
7 changes: 5 additions & 2 deletions bin/prom2teams
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import sys
import os

from werkzeug.serving import run_simple

try:
from prom2teams.app.api import app as application
Expand All @@ -12,4 +12,7 @@ except ImportError:
if __name__ == "__main__":
host = application.config['HOST']
port = int(application.config['PORT'])
application.run(host=host, port=port)
# application.run(host=host, port=port, extra_files="/opt/prom2teams/config.ini")
run_simple(hostname=host, port=port, application=application, use_reloader=True,
reloader_type='stat', reloader_interval=5, extra_files="/opt/prom2teams/config.ini")

0 comments on commit 5fe6101

Please sign in to comment.