[+] improve POST:/payload

1. fix get_or_create parameters;
  2. TODO, check existence before calling
    summarizer,
    return schema for rest api
    with result and its id;
This commit is contained in:
Siarhei Siniak 2025-07-28 10:59:16 +03:00
parent a5b19cfe2a
commit 81be8abc50
5 changed files with 13 additions and 5 deletions

@ -45,7 +45,7 @@ RUN \
--break-system-packages \ --break-system-packages \
--no-index \ --no-index \
-f releases/whl \ -f releases/whl \
'online.fxreader.pr34.test_task_2025_07_17_v2==0.1.13' 'online.fxreader.pr34.test_task_2025_07_17_v2==0.1.15'
ENTRYPOINT ["tini", "--"] ENTRYPOINT ["tini", "--"]
CMD [ \ CMD [ \

@ -9,7 +9,7 @@ classifiers = [
] ]
name = 'online.fxreader.pr34.test_task_2025_07_17_v2' name = 'online.fxreader.pr34.test_task_2025_07_17_v2'
version = '0.1.13' version = '0.1.15'
dependencies = [ dependencies = [
'alembic', 'alembic',

@ -28,9 +28,11 @@ async def payload_get_or_create(
return await get_or_create( return await get_or_create(
session, session,
Payload, Payload,
create_method_kwargs=dict(
output=output, output=output,
list_1=list_1, list_1=list_1,
list_2=list_2, list_2=list_2,
),
input_hash=input_hash, input_hash=input_hash,
) )