add session ID handling to worker communication protocol; allow backend to associate session IDs with subscriptions
Some checks failed
Build Backend Application and Docker Image / build-docker (push) Has been cancelled
Some checks failed
Build Backend Application and Docker Image / build-docker (push) Has been cancelled
This commit is contained in:
parent
3c67fa933c
commit
8f32de1510
1 changed files with 21 additions and 0 deletions
21
worker.md
21
worker.md
|
@ -255,6 +255,27 @@ Backend's response to a `patchSession` message.
|
|||
}
|
||||
```
|
||||
|
||||
### 5.5. Set Session ID
|
||||
|
||||
Allows the backend to instruct the worker to associate a session ID with a subscription. This is useful for linking detection events to a specific session.
|
||||
|
||||
- **Type:** `setSessionId`
|
||||
|
||||
**Payload:**
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "setSessionId",
|
||||
"payload": {
|
||||
"subscriptionIdentifier": "display-001;cam-002",
|
||||
"sessionId": 12345
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:**
|
||||
> - The worker should store the session ID for the given subscription and use it in subsequent detection or patch messages as appropriate.
|
||||
|
||||
## 6. Example Communication Log
|
||||
|
||||
This section shows a typical sequence of messages between the backend and the worker. Patch messages are not included, as they are only used when the worker cannot keep up.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue