From 9a8a0bd8655a1af62e003cb0bdceff873404d8f1 Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Tue, 5 Apr 2022 15:20:34 +0530 Subject: [PATCH] feat: Ability to customize the online presence duration (#4385) --- lib/online_status_tracker.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/online_status_tracker.rb b/lib/online_status_tracker.rb index 8688c4251..ec5f65812 100644 --- a/lib/online_status_tracker.rb +++ b/lib/online_status_tracker.rb @@ -1,5 +1,6 @@ module OnlineStatusTracker - PRESENCE_DURATION = 20.seconds + # NOTE: You can customise the environment variable to keep your agents/contacts as online for longer + PRESENCE_DURATION = ENV.fetch('PRESENCE_DURATION', 20).to_i.seconds # presence : sorted set with timestamp as the score & object id as value