disable discovery cache

Disable discovery cache as it broke CSV commands on windows with lock
errors. The cache is new in googleapiclient 1.4.2 which was upgraded
after GAM 3.61:

30125120b4

down the line, we should investigate actual issue with cache as enabling
it would improve GAM performance.
This commit is contained in:
Jay Lee
2015-12-23 08:06:22 -05:00
parent 1dd36424be
commit 327e09291b

View File

@ -809,7 +809,7 @@ def buildGAPIObject(api):
if api in [u'directory', u'reports', u'datatransfer']:
api = u'admin'
try:
service = googleapiclient.discovery.build(api, version, http=http)
service = googleapiclient.discovery.build(api, version, http=http, cache_discovery=False)
except googleapiclient.errors.UnknownApiNameOrVersion:
service = getServiceFromDiscoveryDocument(api, version, http)
except httplib2.ServerNotFoundError as e:
@ -870,7 +870,7 @@ def buildGAPIServiceObject(api, act_as, soft_errors=False):
cache=GC_Values[GC_CACHE_DIR]))
version = getAPIVer(api)
try:
return googleapiclient.discovery.build(api, version, http=http)
return googleapiclient.discovery.build(api, version, http=http, cache_discovery=False)
except googleapiclient.errors.UnknownApiNameOrVersion:
return getServiceFromDiscoveryDocument(api, version, http)
except httplib2.ServerNotFoundError as e: