update tasks

This commit is contained in:
bakatrouble 2024-09-25 18:58:29 +03:00
parent 62392aa89a
commit 4424c52b9a

View File

@ -14,6 +14,7 @@ from djconfig import config
@app.task(bind=True) @app.task(bind=True)
def upload_image_rpc(self, queued_image_pk, fpath, caption): def upload_image_rpc(self, queued_image_pk, fpath, caption):
from .modules.channel_helper import QueuedItem from .modules.channel_helper import QueuedItem
config._reload()
try: try:
logging.warning(f'Processing upload task for queued item #{queued_image_pk}') logging.warning(f'Processing upload task for queued item #{queued_image_pk}')
qi = QueuedItem.objects.get(pk=queued_image_pk) qi = QueuedItem.objects.get(pk=queued_image_pk)
@ -50,6 +51,7 @@ def upload_image_rpc(self, queued_image_pk, fpath, caption):
@app.task(bind=True) @app.task(bind=True)
def upload_animation_rpc(self, queued_image_pk, fpath, caption): def upload_animation_rpc(self, queued_image_pk, fpath, caption):
from .modules.channel_helper import QueuedItem from .modules.channel_helper import QueuedItem
config._reload()
try: try:
logging.warning(f'Processing upload task for queued animation item #{queued_image_pk}') logging.warning(f'Processing upload task for queued animation item #{queued_image_pk}')
qi = QueuedItem.objects.get(pk=queued_image_pk) qi = QueuedItem.objects.get(pk=queued_image_pk)