完善细节
This commit is contained in:
@@ -22,6 +22,13 @@ def push_file(bucket_name, object_name, file_bytes, contents, content_type):
|
||||
)
|
||||
|
||||
|
||||
def get_upload_token(bucket_name, object_name, xpires=timedelta(hours=1)):
|
||||
upload_url = minio_client.presigned_put_object(
|
||||
bucket_name=bucket_name, object_name=object_name, expires=xpires
|
||||
)
|
||||
return {"upload_url": upload_url, "object_name": object_name}
|
||||
|
||||
|
||||
def get_temp_url(bucket_name, object_name):
|
||||
return minio_client.presigned_get_object(
|
||||
bucket_name, object_name, expires=timedelta(seconds=3600)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from utils.GlobalVariable import LOCAL_IP
|
||||
|
||||
RABBIT_HOST = LOCAL_IP
|
||||
RABBIT_VHOST = "/bbit_ai"
|
||||
RABBIT_USER = "bbit_ai"
|
||||
RABBIT_VHOST = "bbit_ai"
|
||||
RABBIT_USER = "ai_lab"
|
||||
RABBIT_PASSWORD = "123456"
|
||||
QUEUE_NAME = "analysis_queue"
|
||||
|
||||
Reference in New Issue
Block a user