Skip to content

Commit

Permalink
Merge branch 'release/v19.12.20'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c committed Dec 20, 2019
2 parents 06ec87f + e4b0a1c commit 3de06e7
Show file tree
Hide file tree
Showing 32 changed files with 2,934 additions and 325 deletions.
13 changes: 13 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ def flush_cache():
r.flushdb()


@app.cli.command()
def last_usage():
"""Returns number of seconds since last usage was recorded
NB in the event of no recorded usage, such as after a redis flush
a value of -1 will be returned
"""
from portal.usage_monitor import last_usage
seconds_old = last_usage() or -1
click.echo(seconds_old)


@app.cli.command()
def sync():
"""Synchronize database with latest schema and persistence data.
Expand Down
Loading

0 comments on commit 3de06e7

Please sign in to comment.