m8chaa commited on
Commit
2cccb9a
·
verified ·
1 Parent(s): f2a25f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- logger.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
- logger.info(f"Created channel for folder {folder_id}: {response['id']}")
863
  return response
864
  except HttpError as e:
865
- logger.error(f"HttpError creating channel for folder {folder_id}: {e.content}")
866
  raise
867
  except Exception as e:
868
- logger.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):
 
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):