-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Description:
Currently, the image_save_path is hardcoded as:
image_save_path = f"imgs/saved_image_demo.png"This causes issues when handling multiple API requests simultaneously, as the file gets overwritten. To support parallel processing, I propose changing it to:
import uuid
def generate_uuid():
return str(uuid.uuid4())
image_save_path = f"imgs/{generate_uuid()}.png"Proposed Solution:
Modify the save path to use generate_uuid() to ensure unique filenames for each request.
This will prevent file conflicts and allow the API to process multiple requests concurrently.
Impact:
Improves API reliability in multi-request scenarios.
Prevents data loss due to file overwrites.
Let me know if any additional considerations are needed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels