Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,11 +117,12 @@ async def post_to_google_apps_script(appsScriptsURL, body, s3_orginal_url):
|
|
| 117 |
|
| 118 |
async def background_worker(sheeturl, image_contents, filename, content_type, appsScriptsURL):
|
| 119 |
sheetID = sheeturl.split('/')[-2]
|
| 120 |
-
|
| 121 |
user_doc = users_ref.document(sheetID)
|
| 122 |
# get the 'total_uploaded' field from the user's document
|
| 123 |
user_data = user_doc.get().to_dict()
|
| 124 |
if user_data is None:
|
|
|
|
| 125 |
await record_failure('', 'User not found.', sheetID)
|
| 126 |
return {"message": "User not found."}
|
| 127 |
total_uploaded = user_data.get('total_uploaded', 0)
|
|
|
|
| 117 |
|
| 118 |
async def background_worker(sheeturl, image_contents, filename, content_type, appsScriptsURL):
|
| 119 |
sheetID = sheeturl.split('/')[-2]
|
| 120 |
+
logging.info("user's sheetID: " + sheetID)
|
| 121 |
user_doc = users_ref.document(sheetID)
|
| 122 |
# get the 'total_uploaded' field from the user's document
|
| 123 |
user_data = user_doc.get().to_dict()
|
| 124 |
if user_data is None:
|
| 125 |
+
logging.info('user not found')
|
| 126 |
await record_failure('', 'User not found.', sheetID)
|
| 127 |
return {"message": "User not found."}
|
| 128 |
total_uploaded = user_data.get('total_uploaded', 0)
|