mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-18 15:58:52 +08:00
Adds rate limit to Notifiarr
This commit is contained in:
parent
0c6ebcd316
commit
580351f6d5
1 changed files with 4 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import time
|
||||
from json import JSONDecodeError
|
||||
|
||||
from modules import util
|
||||
|
|
@ -36,4 +37,6 @@ class Notifiarr:
|
|||
def notification(self, json):
|
||||
"""Send notification to Notifiarr"""
|
||||
params = {"qbit_client": self.config.data["qbt"]["host"], "instance": self.instance}
|
||||
return self.config.get(f"{self.url}notification/qbitManage/", json=json, headers=self.header, params=params)
|
||||
response = self.config.get(f"{self.url}notification/qbitManage/", json=json, headers=self.header, params=params)
|
||||
time.sleep(1) # Pause for 1 second before sending the next request
|
||||
return response
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue