Skip to content

RFC: Provide a way to mass update presences #145

Open
@AndrewDryga

Description

@AndrewDryga

ATM if you want to update all presences for a topic you need to call Tracker.list/2 and then Tracker.update/5 for each item in the list. Tracker.update/5 implemented on top of GenServer.call/3 which would be really expensive if we going to update lots of presences at a time.

What do you feel about adding a Tracker.update_metas/3:

Tracker.update_metas(tracker_name, topic, fn _pid, _key, meta ->
  Map.put(meta, :last_updated, DateTime.utc_now()
end)

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