Story #2896

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

Added by Tom Clegg over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Start date:
06/16/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Subtasks

Task #3029: Review 2896-websocket-cliResolvedRadhika Chippada

Associated revisions

Revision 586c0409
Added by Radhika Chippada over 6 years ago

closes #2896
Merge branch '2896-websocket-cli'

History

#1 Updated by Radhika Chippada over 6 years ago

  • Assigned To set to Radhika Chippada

#2 Updated by Radhika Chippada over 6 years ago

  • Status changed from New to In Progress

#3 Updated by Radhika Chippada over 6 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.

#4 Updated by Tim Pierce over 6 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.

#5 Updated by Radhika Chippada over 6 years ago

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

Applied in changeset arvados|commit:586c0409bf9496bae169c2d51b04806b82c342a9.

Also available in: Atom PDF