Add sleep_and_retry decorator to request method in AudNexusConnector
This commit is contained in:
parent
fbda3f1f1d
commit
bcd06ffecc
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from ratelimit import limits
|
||||
from ratelimit import limits, sleep_and_retry
|
||||
import requests
|
||||
import json
|
||||
import os
|
||||
|
|
@ -6,6 +6,7 @@ import os
|
|||
|
||||
class AudNexusConnector:
|
||||
|
||||
@sleep_and_retry
|
||||
@limits(calls=100, period=60)
|
||||
def request(self, url):
|
||||
return requests.get(url, {"update": 0, "seedAuthors": 0})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue