Merge branch 'faster_phishing' into 'dev'

Change phishing sync time to 1 hour

See merge request stark-industries/jarvis/jarvis-bot!64
This commit is contained in:
Zeva Rose 2022-06-01 21:02:05 +00:00
commit 7b4c62a78f

View file

@ -77,11 +77,11 @@ class Jarvis(Client):
self.phishing_domains = [] self.phishing_domains = []
self.pre_run_callback = self._prerun self.pre_run_callback = self._prerun
@Task.create(IntervalTrigger(days=1)) @Task.create(IntervalTrigger(hours=1))
async def _update_domains(self) -> None: async def _update_domains(self) -> None:
self.logger.debug("Updating phishing domains") self.logger.debug("Updating phishing domains")
async with ClientSession(headers={"X-Identity": "Discord: zevaryx#5779"}) as session: async with ClientSession(headers={"X-Identity": "Discord: zevaryx#5779"}) as session:
response = await session.get("https://phish.sinking.yachts/v2/recent/86415") response = await session.get("https://phish.sinking.yachts/v2/recent/3700")
response.raise_for_status() response.raise_for_status()
data = await response.json() data = await response.json()