update mock client/publish

This commit is contained in:
Julius Unverfehrt 2022-03-15 13:29:46 +01:00
parent 8744cdeb6d
commit 38fb073291
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ def parse_args():
def add_file_compressed(storage, bucket_name, dossier_id, path) -> None:
path_gz = combine_dossier_id_and_file_id_and_extension(
dossier_id, Path(path).stem, CONFIG.storage.target_file_extension
dossier_id, Path(path).stem, ".ORIGIN.pdf.gz"
)
with open(path, "rb") as f:

View File

@ -10,7 +10,7 @@ def build_message_bodies():
for bucket_name, pdf_name in storage.get_all_object_names(CONFIG.storage.bucket):
file_id = pdf_name.split(".")[0]
dossier_id, file_id = file_id.split("/")
yield json.dumps({"dossierId": dossier_id, "fileId": file_id}).encode()
yield json.dumps({"dossierId": dossier_id, "fileId": file_id, "targetFileExtension": "ORIGIN.pdf.gz", "responseFileExtension": "detr.json.gz"}).encode()
if __name__ == "__main__":