From d7a5a60508c9fa57f8dfce9cf419973fbe86dbb0 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sun, 9 Jul 2023 14:41:39 -0400 Subject: [PATCH] Reddit RateLimit variables should be unique per instance --- apprise/plugins/NotifyReddit.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apprise/plugins/NotifyReddit.py b/apprise/plugins/NotifyReddit.py index 996ffd95..37816a48 100644 --- a/apprise/plugins/NotifyReddit.py +++ b/apprise/plugins/NotifyReddit.py @@ -134,12 +134,6 @@ class NotifyReddit(NotifyBase): # still allow to make. request_rate_per_sec = 0 - # For Tracking Purposes - ratelimit_reset = datetime.now(timezone.utc).replace(tzinfo=None) - - # Default to 1.0 - ratelimit_remaining = 1.0 - # Taken right from google.auth.helpers: clock_skew = timedelta(seconds=10) @@ -326,6 +320,13 @@ class NotifyReddit(NotifyBase): if not self.subreddits: self.logger.warning( 'No subreddits were identified to be notified') + + # For Rate Limit Tracking Purposes + self.ratelimit_reset = datetime.now(timezone.utc).replace(tzinfo=None) + + # Default to 1.0 + self.ratelimit_remaining = 1.0 + return def url(self, privacy=False, *args, **kwargs):