`server.jobs.wait_for_job` fails for ID generated by `create_extract`
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 50/100
Piste de recherche
Start at server.jobs.wait_for_job and server.jobs.get_by_id, then compare their behavior with tsc.Pager(server.jobs) for the ID returned by server.datasources.create_extract. Reproduce the 400031 response and trace how each path queries the job; done means the generated extract job ID works with wait_for_job and get_by_id.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
The job ID generated when creating an extract via TSC is not queryable by the server.jobs.wait_for_job method.
Versions
Details of your environment, including:
- Tableau Server version 3.10
- Python 3.8.12
- tableauserverclient==0.19.0
To Reproduce
refresh_job = server.datasources.create_extract(datasource_item)
job_status = server.jobs.wait_for_job(refresh_job.id)
# Also
server.jobs.get_by_id(refresh_job.id)
Results
400031: Bad Request
There was a problem querying job '{refresh_job.id}'.
Solution
from tableauserverclient.exponential_backoff import ExponentialBackoffTimer
refresh_job = server.datasources.create_extract(datasource_item)
backoff_timer = ExponentialBackoffTimer()
job = list(j for j in tsc.Pager(server.jobs) if j.id == refresh_job.id)[0]
while job.ended_at is None:
backoff_timer.sleep()
print(f"{refresh_job.id} still running")
job = list(j for j in tsc.Pager(server.jobs) if j.id == refresh_job.id)[0]
- Langage dominant
- Python
- Étoiles
- 716
- Forks
- 446
- Merge moyen
- 8 j 8 h
- PR mergées (30 j)
- 2
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de tableau/server-client-python
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
tableau/server-client-python#1865 ·
-
in-progress
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
tableau/server-client-python#1829 · 1 commentaire ·
-
enhancement gap needs investigation
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
tableau/server-client-python#1322 · 1 commentaire ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Ouvertehelp wanted Server-Side Enhancement ui-exists
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
tableau/server-client-python#1101 · 3 commentaires ·
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
tableau/server-client-python#783 · 5 commentaires ·
Toutes les issues de tableau/server-client-python
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
stephrobert/dsoxlab#238 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
sublimehq/package_control#1780 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
nwg-piotr/nwg-displays#145 ·