Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -857,15 +857,15 @@ class DriveWatcher:
|
|
| 857 |
'type': 'web_hook',
|
| 858 |
'address': 'https://m8chaa-re-sheet-develop.hf.space/notifications',
|
| 859 |
}
|
| 860 |
-
|
| 861 |
response = app.state.drive_service.files().watch(fileId=folder_id, body=body).execute()
|
| 862 |
-
|
| 863 |
return response
|
| 864 |
except HttpError as e:
|
| 865 |
-
|
| 866 |
raise
|
| 867 |
except Exception as e:
|
| 868 |
-
|
| 869 |
raise
|
| 870 |
|
| 871 |
def close_channel(self, channel_id: str, resource_id: str):
|
|
|
|
| 857 |
'type': 'web_hook',
|
| 858 |
'address': 'https://m8chaa-re-sheet-develop.hf.space/notifications',
|
| 859 |
}
|
| 860 |
+
logging.info(f"Attempting to create channel for folder {folder_id} with body: {body}")
|
| 861 |
response = app.state.drive_service.files().watch(fileId=folder_id, body=body).execute()
|
| 862 |
+
logging.info(f"Created channel for folder {folder_id}: {response['id']}")
|
| 863 |
return response
|
| 864 |
except HttpError as e:
|
| 865 |
+
logging.error(f"HttpError creating channel for folder {folder_id}: {e.content}")
|
| 866 |
raise
|
| 867 |
except Exception as e:
|
| 868 |
+
logging.error(f"Unexpected error creating channel for folder {folder_id}: {str(e)}")
|
| 869 |
raise
|
| 870 |
|
| 871 |
def close_channel(self, channel_id: str, resource_id: str):
|