Add cancel job#299
Merged
graysonarts merged 5 commits intotableau:developmenttableau/server-client-python:developmentfrom Jun 1, 2018
graysonarts:add-cancel-jobCopy head branch name to clipboard
Merged
Add cancel job#299graysonarts merged 5 commits intotableau:developmenttableau/server-client-python:developmentfrom graysonarts:add-cancel-jobCopy head branch name to clipboard
graysonarts merged 5 commits intotableau:developmenttableau/server-client-python:developmentfrom
graysonarts:add-cancel-jobCopy head branch name to clipboard
Conversation
shinchris
approved these changes
May 31, 2018
samples/kill_all_jobs.py
Outdated
| @@ -0,0 +1,47 @@ | ||
| #### | ||
| # This script demonstrates how to list all of the workbooks or datasources |
Contributor
There was a problem hiding this comment.
Description here and on line 15 needs update
t8y8
approved these changes
May 31, 2018
samples/kill_all_jobs.py
Outdated
| req = TSC.RequestOptions() | ||
|
|
||
| req.filter.add(TSC.Filter("progress", TSC.RequestOptions.Operator.LessThanOrEqual, 0)) | ||
| for job in TSC.Pager(server.jobs.get, request_opts=req): |
Collaborator
There was a problem hiding this comment.
Nit: You can just pass the endpoint
| self._make_request(self.parent_srv.session.delete, url, auth_token=self.parent_srv.auth_token) | ||
|
|
||
| def put_request(self, url, xml_request, content_type='text/xml'): | ||
| def put_request(self, url, xml_request=None, content_type='text/xml'): |
Collaborator
There was a problem hiding this comment.
So cancel takes an empty (as in b'') PUT? Didn't run job take an empty <tsRequest/ >?
| import warnings | ||
| warnings.warn("Jobs.get(job_id) is deprecated, update code to use Jobs.get_by_id(job_id)") | ||
| return self.get_by_id(job_id) | ||
| if isinstance(job_id, RequestOptionsBase): |
Collaborator
There was a problem hiding this comment.
I'm so sad. But customers will love the functionality!
Contributor
Author
There was a problem hiding this comment.
yeah once we hit 1.0, we can remove this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.