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

Allow wait condition to access timestamps #39

Merged
merged 3 commits into from
Sep 26, 2017

Commits on Sep 24, 2017

  1. Allow wait condition to access timestamps

    The current wait_key() condition only checks the value of a telstate
    item. Extend it to optionally check the associated timestamp of the
    item (if the key is mutable). This allows scripts to wait on telstate
    until a fresh value appears for an item.
    
    In the process, extend the redis pubsub update message format to match
    the raw sensor format used in the main key-value store. In other words,
    attributes have pickled values and sensors additionally prepend a packed
    timestamp to each pickled value.
    
    The timestamp parameter of the wait_key condition is optional so that
    this extension is backwards compatible.
    
    This exposed an ASCII encoding bug in fakeredis on Python 2, for which
    we include a monkey patch as workaround. Once fakeredis issue #146
    is resolved the monkey patch can go away.
    
    This addresses JIRA ticket SR-965.
    ludwigschwardt committed Sep 24, 2017
    Configuration menu
    Copy the full SHA
    4b78d15 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2017

  1. Force condition callable to accept timestamp param

    Remove the hacky support for two types of condition callable and
    standardise on the most general one. It is now backwards compatible
    as no-one seems to use `wait_key` anymore... The observation scripts
    will use the new version soon, though.
    ludwigschwardt committed Sep 26, 2017
    Configuration menu
    Copy the full SHA
    b3c4c27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c47a88 View commit details
    Browse the repository at this point in the history