Skip to content

Commit 2845dda

Browse files
committed
managed imports
1 parent bb94fc6 commit 2845dda

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/src/shared/database/database.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
from sqlalchemy.orm import sessionmaker
2222
import logging
23-
from google.cloud import tasks_v2
2423

2524
from shared.common.logging_utils import get_env_logging_level
2625

@@ -127,6 +126,7 @@ def create_refresh_materialized_view_task():
127126
"""
128127
from google.protobuf import timestamp_pb2
129128
from datetime import datetime, timedelta
129+
from google.cloud import tasks_v2
130130

131131
try:
132132
logging.info("Creating materialized view refresh task.")
@@ -210,8 +210,10 @@ def create_http_task_with_name(
210210
queue_name: str,
211211
task_name: str,
212212
task_time: str,
213-
http_method: tasks_v2.HttpMethod,
213+
http_method,
214214
):
215+
from google.cloud import tasks_v2
216+
215217
"""Creates a GCP Cloud Task."""
216218

217219
token = (tasks_v2.OidcToken(service_account_email=os.getenv("SERVICE_ACCOUNT_EMAIL")),)

0 commit comments

Comments
 (0)