8000 fix basic sample · daxcurson/server-client-python@65f8476 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65f8476

Browse files
committed
fix basic sample
1. remove metrics since feature is disabled 2. update VALID_INTERVALS to include all values returned from the server
1 parent 21503f4 commit 65f8476

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

samples/getting_started/3_hello_universe.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ def main():
6262
print("{} jobs".format(pagination.total_available))
6363
print(jobs[0])
6464

65-
metrics, pagination = server.metrics.get()
66-
if metrics:
67-
print("{} metrics".format(pagination.total_available))
68-
print(metrics[0])
69-
7065
schedules, pagination = server.schedules.get()
7166
if schedules:
7267
print("{} schedules".format(pagination.total_available))
@@ -82,7 +77,7 @@ def main():
8277
print("{} webhooks".format(pagination.total_available))
8378
print(webhooks[0])
8479

85-
users, pagination = server.metrics.get()
80+
users, pagination = server.users.get()
8681
if users:
8782
print("{} users".format(pagination.total_available))
8883
print(users[0])
@@ -92,5 +87,5 @@ def main():
9287
print("{} groups".format(pagination.total_available))
9388
print(groups[0])
9489

95-
if __name__ == "__main__":
96-
main()
90+
if __name__ == "__main__":
91+
main()

tableauserverclient/models/interval_item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def interval(self):
6969

7070
@interval.setter
7171
def interval(self, intervals):
72-
VALID_INTERVALS = {0.25, 0.5, 1, 2, 4, 6, 8, 12}
72+
VALID_INTERVALS = {0.25, 0.5, 1, 2, 4, 6, 8, 12, 24}
7373
for interval in intervals:
7474
# if an hourly interval is a string, then it is a weekDay interval
7575
if isinstance(interval, str) and not interval.isnumeric() and not hasattr(IntervalItem.Day, interval):

0 commit comments

Comments
 (0)
0