mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-04 22:07:45 +00:00
änderung
This commit is contained in:
parent
d1dd5cc7dd
commit
1a080286b3
1 changed files with 7 additions and 14 deletions
|
|
@ -99,19 +99,12 @@ class BoswatchPlugin(PluginBase):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(url, data=payload, headers=headers) as response:
|
async with session.post(url, data=payload, headers=headers) as response:
|
||||||
response_text = await response.text()
|
response_text = await response.text()
|
||||||
|
|
||||||
asyncio.ensure_future(self._fetch(url, session))
|
|
||||||
|
|
||||||
logging.exception(response_text)
|
logging.exception(response_text)
|
||||||
|
|
||||||
await response_text
|
def teardown(self):
|
||||||
|
r"""!Called after alarm
|
||||||
async def _fetch(self, url, session):
|
Remove if not implemented"""
|
||||||
"""Fetches requests
|
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
@param url: url
|
loop.run_until_complete(_post_Request())
|
||||||
|
|
||||||
@param session: Clientsession instance"""
|
|
||||||
async with session.get(url) as response:
|
|
||||||
logging.info("{} returned [{}]".format(response.url, response.status))
|
|
||||||
return await response.read()
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue