mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Add a management command for active user stats
(imported from commit a4227858b422c48e272700880e0c21889c7ce566)
This commit is contained in:
@@ -5,13 +5,15 @@ import hashlib
|
||||
from time import sleep, time
|
||||
from django.conf import settings
|
||||
|
||||
def statsd_key(val):
|
||||
def statsd_key(val, clean_periods=False):
|
||||
if not isinstance(val, str):
|
||||
val = str(val)
|
||||
|
||||
if ':' in val:
|
||||
val = val.split(':')[0]
|
||||
val = val.replace('-', "_")
|
||||
if clean_periods:
|
||||
val = val.replace('.', '_')
|
||||
|
||||
return val
|
||||
|
||||
|
||||
Reference in New Issue
Block a user