Skip to content

[BACKEND] Add channels consumers to send notifications about bot updates to the front end #6

@hadamrd

Description

@hadamrd

Create a consumer to hande interactions with the front end

  • The consumer should intercept messages coming to a group, the id of the group should be unique to user id. For example user_id_bot_updates.
  • The consumer should send events to the front about the bot updates/logs. Format of the data sent should include at least :
    session_run_id, bot_name, event_id, stats.
  • Stats object should contain the new updates for the fields of the session_run object.
  • Before sending to the front this notif we should update the session_run object in the database.

Add a mechanism that allows dev to pass a listener to the bot

  • the listener should be called whenever an event tagged as updated event is triggered inside the bot events manager.
  • in the backend after each bot start, add to it update listener that will make the channels consumer send notifs to the front.
  • the listener should in particular be called after bot simple state updates like when its in fight or roleplay or authenticating, which will be handeled separatly by updating the session_run.status and sending the newx status to the front.
  • front should not show the state update in the list of notifications

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions