Story #2896
closed
Add CLI tool to display job log messages in real time using websocket API
Added by Tom Clegg almost 11 years ago.
Updated almost 11 years ago.
Assigned To:
Radhika Chippada
Estimated time:
(Total: 0.00 h)
- Assigned To set to Radhika Chippada
- Status changed from New to In Progress
- 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.
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.
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:586c0409bf9496bae169c2d51b04806b82c342a9.
Also available in: Atom
PDF