disable discovery cache (#5058)

This commit is contained in:
Chen Sun 2021-01-29 11:08:03 -08:00 committed by GitHub
parent 24100c45e1
commit 48a34e677d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ class DataprocClient:
""" Internal client for calling Dataproc APIs.
"""
def __init__(self):
self._dataproc = discovery.build('dataproc', 'v1')
self._dataproc = discovery.build('dataproc', 'v1', cache_discovery=False)
def create_cluster(self, project_id, region, cluster, request_id):
"""Creates a new dataproc cluster.

View File

@ -23,7 +23,7 @@ class MLEngineClient:
""" Client for calling MLEngine APIs.
"""
def __init__(self):
self._ml_client = discovery.build('ml', 'v1')
self._ml_client = discovery.build('ml', 'v1', cache_discovery=False)
def create_job(self, project_id, job):
"""Create a new job.