put some temp sleeps in there

This commit is contained in:
2025-04-10 05:15:34 -07:00
parent 1dfaac75d2
commit 1821d86a1e
+6 -1
View File
@@ -7,6 +7,7 @@ import aiohttp
import json import json
import os import os
import base64 import base64
import time
from google.oauth2 import service_account from google.oauth2 import service_account
from googleapiclient.discovery import build from googleapiclient.discovery import build
@@ -16,7 +17,7 @@ from googleapiclient.errors import HttpError
EVENTNY_ENDPOINT = "https://www.eventeny.com/funcs/event/event-page-elements-2022-03-06.php" EVENTNY_ENDPOINT = "https://www.eventeny.com/funcs/event/event-page-elements-2022-03-06.php"
SAK_BIZ_ID = "233997" SAK_BIZ_ID = "233997"
SAK_EVENT_ID = "13462" SAK_EVENT_ID = "13462"
BATCH_LIMIT = 500 BATCH_LIMIT = 190
async def clear_sakuracon_events(config_path="config/sakuracon.json"): async def clear_sakuracon_events(config_path="config/sakuracon.json"):
with open(config_path) as f: with open(config_path) as f:
@@ -266,11 +267,15 @@ def update_gcal(scraped_events, tracks, cfg):
batch.execute() batch.execute()
batchlen = 0 batchlen = 0
batch = service.new_batch_http_request() batch = service.new_batch_http_request()
print("batch zzz")
time.sleep(60)
except HttpError as error: except HttpError as error:
print(f"An error occurred: {error}") print(f"An error occurred: {error}")
print(gcal_body) print(gcal_body)
batch.execute() batch.execute()
batchlen = 0 batchlen = 0
print("batch zzz")
time.sleep(60)
# delete all gcal_events which are not in the events array # delete all gcal_events which are not in the events array
# we have the list of gcal events # we have the list of gcal events