Skip to content

Conversation

graysonarts
Copy link
Contributor

No description provided.

@graysonarts graysonarts requested review from t8y8 and shinchris 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

@@ -76,7 +76,7 @@ def delete_request(self, url):
# We don't return anything for a delete
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...

@@ -17,12 +18,20 @@ def get(self, job_id=None, req_options=None):
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