mistk.watch.watch_manager module

Module for watching a resource stored in MISTK

mistk.watch.watch_manager.notify_watch(rid, item, operation='modified')

Notifies all subscribers of an update to a watch object

Parameters
  • rid – The name of the subscriber queue

  • item – The item to send in the watch event

  • operation – The operation that triggered this notification

mistk.watch.watch_manager.object_stream(objects)

Streams serialized objects as a json string

Parameters

objects – The objects to stream

mistk.watch.watch_manager.watch(rid, resource_version=None, init_value=None, init_value_op='modified')

Creates a watch on an object.

Parameters
  • rid – The id of the object, used to name the subscriber queue

  • resource_version – The minimum resource version to check.

  • init_value – The initial value of the object to watch

  • init_value_op – The operation to watch for. One of {created, modified, deleted}