The core code is as follows.More details such as full request and response logs, and request-id for high latency API requests will be provided to you as soon as possible.
Regards
_______________________________________________________________________
def adwords_data_device_cost_new(site, customer_id, ga_service):
...
query = "..."
response = ga_service.search_stream(
customer_id=customer_id, query=query)
....
return data
def thread_func(site, customer_id):
customer_data = adwords_data_device_cost_new(site,
customer_id, ga_service)
customer_data = pd.DataFrame(customer_data)
return customer_data
L1 = []
with ThreadPoolExecutor(10) as pool:
for customer_id in campaign_dict.keys():
all_task.append(pool.submit(thread_func, site=site, customer_id=customer_id))
for future in as_completed(all_task):
customer_data = future.result()
if not customer_data.empty:
L1.append(customer_data)