Describe the bug
I had the code working for 2 months and 11/3 I got the error 429000
Versions
Details of your environment, including:
- Tableau Server version (or note if using Tableau Online)
- Python version
- TSC library version
To Reproduce
# refresh
task_pre_to_run = server.tasks.get_by_id(task_id)
server.tasks.run(task_pre_to_run)
# get job list
req_option = TSC.RequestOptions()
req_option.filter.add(TSC.Filter('jobType', TSC.RequestOptions.Operator.Equals, 'refresh_extracts'))
req_option.filter.add(TSC.Filter('createdAt', TSC.RequestOptions.Operator.GreaterThan, datetime_now))
for job in TSC.Pager(server.jobs, request_opts=req_option):
job_get_by_id = server.jobs.get_by_id(job.id)
# wait for the job finished
while job_get_by_id.finish_code == -1:
print('in progress')
time.sleep(30)
job_get_by_id = server.jobs.get_by_id(job.id)
if job_get_by_id.finish_code != -1:
print('not in progress')
break
print('finished')
Results
429000: Too Many Requests
Too many requests for 'api.rest.refresh_extracts'. Please retry after 29 minutes. (ServerResponseError)
from Traceback (most recent call last):
from File ".digdag/tmp/digdag-py-3468120-15445337580251890801/runner.py", line 158, in <module>
result = method(**method_args)
from File "/tmp/digdag-tempdir989003298967390830/workspace/27_all_manage_frequent_update_61865_3468120_3626330837559723575/refresh_tableau_datasource.py", line 49, in refresh_tableau_datasource
server.tasks.run(task_pre_to_run)
from File "/usr/lib/python3.7/tableauserverclient/server/endpoint/endpoint.py", line 163, in wrapper
return func(self, *args, **kwargs)
from File "/usr/lib/python3.7/tableauserverclient/server/endpoint/tasks_endpoint.py", line 65, in run
server_response = self.post_request(url, run_req)
from File "/usr/lib/python3.7/tableauserverclient/server/endpoint/endpoint.py", line 136, in post_request
content_type=content_type,
from File "/usr/lib/python3.7/tableauserverclient/server/endpoint/endpoint.py", line 69, in _make_request
self._check_status(server_response)
from File "/usr/lib/python3.7/tableauserverclient/server/endpoint/endpoint.py", line 86, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace)
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
Describe the bug
I had the code working for 2 months and 11/3 I got the error 429000
Versions
Details of your environment, including:
To Reproduce
Results
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.