Project

General

Profile

Actions

Idea #2896

closed

Add CLI tool to display job log messages in real time using websocket API

Added by Tom Clegg almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Start date:
06/16/2014
Due date:
Story points:
1.0

Subtasks 1 (0 open1 closed)

Task #3029: Review 2896-websocket-cliResolvedRadhika Chippada06/16/2014Actions
Actions #1

Updated by Radhika Chippada almost 10 years ago

  • Assigned To set to Radhika Chippada
Actions #2

Updated by Radhika Chippada almost 10 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Radhika Chippada almost 10 years ago

- Added "arv-ws" command to arv

- It can be invoked with no input options or with a --uuid option. Example invocations:

arv-ws
arv ws
arv-ws --uuid 1234
arv ws --uuid 1234

- When invoked with no input options, the server will send notifications to the client on all events

- When invoked with a uuid, server will send notifications to client on any changes for that object only.

- The arv-ws command does not restrict access to Job uuids. Instead, it can be used with any uuid or with no uuid at all.

Actions #4

Updated by Tim Pierce almost 10 years ago

Review at 91cea2d8:

  • sdk/python/arvados/events.py
    • We should log exceptions that are thrown (to stderr if nothing else). Also, if there are certain exceptions that we expect to handle, we should list them explicitly in the "catch" clause.
  • sdk/python/bin/arv-ws
    • Can you arrange all of the import statements first, followed by all class and function definitions? I find it easier to read that way.
    • More concise: if len(args.uuid)>0: filters = [ ['object_uuid', '=', args.uuid] ]
    • If I'm not mistaken, you should be able to inline the lambda in the subscribe call: ws = subscribe(api, filters, lambda ev: print "\n", ev) and dispense with the on_message def entirely.
Actions #5

Updated by Radhika Chippada almost 10 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:586c0409bf9496bae169c2d51b04806b82c342a9.

Actions

Also available in: Atom PDF