Skip to content

Commit

Permalink
LAST_X_SECONDS
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <praneeth@bpraneeth.com>
  • Loading branch information
bedapudi6788 committed Apr 23, 2024
1 parent 9d77dc6 commit fe3ddd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fastdeploy/_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def on_post(self, req, resp):

class PrometheusMetrics(object):
def on_get(self, req, resp):
_LAST_X_SECONDS = int(req.params.get("last_x_seconds", 60))
_LAST_X_SECONDS = int(
req.params.get("last_x_seconds", int(os.getenv("LAST_X_SECONDS", 60)))
)
CURRENT_TIME = time.time()
LAST_X_SECONDS = time.time() - _LAST_X_SECONDS

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = "praneeth@bpraneeth.com"
AUTHOR = "BEDAPUDI PRANEETH"
REQUIRES_PYTHON = ">=3.6.0"
VERSION = "3.0.13"
VERSION = "3.0.14"

# What packages are required for this module to be executed?
REQUIRED = ["falcon", "liteindex", "zstandard", "gunicorn[gevent]"]
Expand Down

0 comments on commit fe3ddd0

Please sign in to comment.