Rsnarsna commited on
Commit
d1d5bc8
·
verified ·
1 Parent(s): 2a5fdb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -236,11 +236,11 @@ html_content = """
236
  # Endpoint to display the home page with the email processor's status
237
  @app.get("/", response_class=HTMLResponse)
238
  async def home():
239
- # service = authenticate_gmail()
240
- # logger.info(service)
241
- # print(service)
242
- # if service:
243
- # get_latest_email(service)
244
  global running
245
  status = "Running" if running else "Stopped"
246
  return HTMLResponse(content=html_content.replace("{{ status }}", status), status_code=200)
@@ -347,9 +347,6 @@ def get_latest_email(service):
347
  except HttpError as error:
348
  print(f'An error occurred: {error}')
349
 
350
-
351
-
352
-
353
  if __name__ == "__main__":
354
 
355
  print('starting')
 
236
  # Endpoint to display the home page with the email processor's status
237
  @app.get("/", response_class=HTMLResponse)
238
  async def home():
239
+ service = authenticate_gmail()
240
+ logger.info(service)
241
+ print(service)
242
+ if service:
243
+ get_latest_email(service)
244
  global running
245
  status = "Running" if running else "Stopped"
246
  return HTMLResponse(content=html_content.replace("{{ status }}", status), status_code=200)
 
347
  except HttpError as error:
348
  print(f'An error occurred: {error}')
349
 
 
 
 
350
  if __name__ == "__main__":
351
 
352
  print('starting')