Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use platform status message format from API #82

Merged
merged 4 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions voxel51/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1704,15 +1704,9 @@ def run(parser, args):

def _print_platform_status_info(status, token):
records = []
for service, is_up in iteritems(status):
if is_up:
msg = "system operational!"
elif token.base_api_url == "https://api.voxel51.com":
msg = "system down; see https://status.voxel51.com for more info"
else:
msg = "system down; contact your sys admin for more info"

records.append((service, is_up, msg))
for service, status_item in iteritems(status):
records.append(
(service, status_item["operational"], status_item["message"]))

table_str = tabulate(
records, headers=["service", "operational", "message"],
Expand Down
2 changes: 1 addition & 1 deletion voxel51/users/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,4 @@ class JobsQuery(BaseQuery):
SUPPORTED_FIELDS = [
"id", "name", "state", "archived", "upload_date", "expiration_date",
"analytic_id", "compute_mode", "auto_start", "start_date",
"completion_date", "fail_date", "failure_type"]
"completion_date", "fail_date", "failure_type", "expired"]