Created
February 16, 2020 05:41
-
-
Save rbotzer/94eeddb2a71ccd5c35512b35c856807e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update a segment's TTL by 5 extra hours | |
# First, the context for the list increment (path to the TTL) | |
ctx = [ctxh.cdt_ctx_map_key(segment_id)] | |
ops = [ | |
lh.list_increment("u", 0, 5, ctx=ctx), | |
mh.map_get_by_key("u", segment_id, aerospike.MAP_RETURN_KEY_VALUE), | |
] | |
print("\nAdd 5 hours to the TTL of user u1's segment {}".format(segment_id)) | |
if options.interactive: | |
pause() | |
_, _, b = client.operate(key, ops) | |
print(b["u"]) | |
print(spacer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment