Update 'face_recognition/app/app.py'
This commit is contained in:
parent
711e78cfbe
commit
a284227308
@ -12,7 +12,7 @@ def hello_docker():
|
|||||||
@app.route('/acces_minio')
|
@app.route('/acces_minio')
|
||||||
def access_minio():
|
def access_minio():
|
||||||
for bucket in minioClient.list_buckets():
|
for bucket in minioClient.list_buckets():
|
||||||
print(bucket.name, bucket.creation_date, flush=True)
|
print(bucket.name, bucket.creation_date, flush=True)
|
||||||
return('Connection Succesfull')
|
return('Connection Succesfull')
|
||||||
|
|
||||||
|
|
||||||
@ -20,8 +20,8 @@ def access_minio():
|
|||||||
def new_user_id():
|
def new_user_id():
|
||||||
id = None
|
id = None
|
||||||
for limited_try in range(0,5):
|
for limited_try in range(0,5):
|
||||||
id = str(uuid.uuid4())
|
id = str(uuid.uuid4())
|
||||||
if check_id(id) == False:
|
if check_id(id) == False:
|
||||||
break
|
break
|
||||||
#funktionalität implementieres s3 Platzhalterdatei anlegen für user,
|
#funktionalität implementieres s3 Platzhalterdatei anlegen für user,
|
||||||
return(id)
|
return(id)
|
||||||
@ -33,9 +33,9 @@ def check_id(id):
|
|||||||
known = False
|
known = False
|
||||||
for user in users:
|
for user in users:
|
||||||
if id == user.object_name.encode('utf-8'):
|
if id == user.object_name.encode('utf-8'):
|
||||||
known = True
|
known = True
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
return known
|
return known
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
|
Loading…
Reference in New Issue
Block a user