update session ID handling in worker communication protocol; allow null session ID to indicate no active session
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
8f32de1510
commit
3edcd286fd
1 changed files with 14 additions and 2 deletions
16
worker.md
16
worker.md
|
@ -257,7 +257,7 @@ Backend's response to a `patchSession` message.
|
||||||
|
|
||||||
### 5.5. Set Session ID
|
### 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.
|
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. The session ID can be `null` to indicate no active session.
|
||||||
|
|
||||||
- **Type:** `setSessionId`
|
- **Type:** `setSessionId`
|
||||||
|
|
||||||
|
@ -273,8 +273,20 @@ Allows the backend to instruct the worker to associate a session ID with a subsc
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or to clear the session:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "setSessionId",
|
||||||
|
"payload": {
|
||||||
|
"subscriptionIdentifier": "display-001;cam-002",
|
||||||
|
"sessionId": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
> **Note:**
|
> **Note:**
|
||||||
> - The worker should store the session ID for the given subscription and use it in subsequent detection or patch messages as appropriate.
|
> - The worker should store the session ID for the given subscription and use it in subsequent detection or patch messages as appropriate. If `sessionId` is `null`, the worker should treat the subscription as having no active session.
|
||||||
|
|
||||||
## 6. Example Communication Log
|
## 6. Example Communication Log
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue