Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add cancel job#299

Merged
graysonarts merged 5 commits intotableau:developmenttableau/server-client-python:developmentfrom
graysonarts:add-cancel-jobCopy head branch name to clipboard
Jun 1, 2018
Merged

Add cancel job#299
graysonarts merged 5 commits intotableau:developmenttableau/server-client-python:developmentfrom
graysonarts:add-cancel-jobCopy head branch name to clipboard

Conversation

@graysonarts
Copy link
Contributor

No description provided.

@graysonarts graysonarts requested review from shinchris and t8y8 May 31, 2018 15:39
Copy link
Contributor

@shinchris shinchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@@ -0,0 +1,47 @@
####
# This script demonstrates how to list all of the workbooks or datasources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description here and on line 15 needs update

Copy link
Collaborator

@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits 🚀

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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So cancel takes an empty (as in b'') PUT? Didn't run job take an empty <tsRequest/ >?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah...

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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so sad. But customers will love the functionality!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah once we hit 1.0, we can remove this.

@graysonarts graysonarts merged commit dd87aa6 into tableau:development Jun 1, 2018
@graysonarts graysonarts deleted the add-cancel-job branch June 1, 2018 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.