Skip to content

Commit

Permalink
main: Give Cloud Logging some time to come up
Browse files Browse the repository at this point in the history
  • Loading branch information
spbnick committed Jan 25, 2024
1 parent b1396f4 commit 36f4c69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Google Cloud Functions for Kernel CI reporting"""

import os
import time
import atexit
import tempfile
import base64
Expand All @@ -19,6 +20,8 @@
# Setup Google Cloud logging, unless testing
if PROJECT_ID != "TEST_PROJECT":
google.cloud.logging.Client().setup_logging()
# Give logging some time to avoid occasional deployment failures
time.sleep(5)
# Setup KCIDB-specific logging
kcidb.misc.logging_setup(
kcidb.misc.LOGGING_LEVEL_MAP[os.environ.get("KCIDB_LOG_LEVEL", "NONE")]
Expand Down

0 comments on commit 36f4c69

Please sign in to comment.