Skip to content

running get_events from aw_client returns events in reverse order #382

Open
@skewballfox

Description

@skewballfox

not sure if this is a bug in aw_client or the server, or if this is just an undocumented but desired feature.

if you call client.get_events(<bucket_id>,start=ealier_timestamp, end=later_timestamp) and aw_server_rust is running, the list is returned in reverse order: from latest to earliest event. example:

from aw_client.client import ActivityWatchClient
import socket
hostname=socket.gethostname()
afk_events=client.get_events(f"aw-watcher-afk_{hostname}")
print(afk_events[:5:]

this pattern holds for any given bucket.

If this is intended behavior, I think this should be mentioned in the documentation for the function.

Also, if this is a bug in the python client, let me know and I'll create an issue there, but I don't think it is, as looking at the source it's passing the params as intended and returning the results

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions