mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Dockerization + ai review recomendations.
This commit is contained in:
+16
-1
@@ -8,7 +8,18 @@ import uuid
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime
|
||||
from constants import RADIO_HARBOR_ADDRESS, SKIP_TRACK, FILE_SERVICE_ADDRESS, ADD_TO_PRIO_PLAYLIST, REQUEST_MUSIC, CREATE_PRIO_PLAYLIST, CLEAR_PRIO
|
||||
from constants import (
|
||||
RADIO_HARBOR_ADDRESS,
|
||||
SKIP_TRACK,
|
||||
FILE_SERVICE_ADDRESS,
|
||||
ADD_TO_PRIO_PLAYLIST,
|
||||
REQUEST_MUSIC,
|
||||
CREATE_PRIO_PLAYLIST,
|
||||
CLEAR_PRIO,
|
||||
service_headers,
|
||||
)
|
||||
|
||||
SERVICE_HEADERS = service_headers()
|
||||
|
||||
class RadioModule(commands.Cog):
|
||||
def __init__(self, bot, logger_name):
|
||||
@@ -95,6 +106,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{ADD_TO_PRIO_PLAYLIST}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -130,6 +142,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{REQUEST_MUSIC}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -167,6 +180,7 @@ class RadioModule(commands.Cog):
|
||||
requests.post,
|
||||
f"{FILE_SERVICE_ADDRESS}{CREATE_PRIO_PLAYLIST}",
|
||||
json=jrequest,
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
@@ -194,6 +208,7 @@ class RadioModule(commands.Cog):
|
||||
coroutine = asyncio.to_thread(
|
||||
requests.get,
|
||||
f"{FILE_SERVICE_ADDRESS}{CLEAR_PRIO}",
|
||||
headers=SERVICE_HEADERS,
|
||||
timeout=360,
|
||||
)
|
||||
result = await coroutine
|
||||
|
||||
Reference in New Issue
Block a user