While this works, it means the 5-concurrent-sessions limit will be reached sooner or later.
The sessions will eventually (depending on the session timeout setting in the QMC) time out and be deleted, but that timeout is by default 30 minutes.
A better (?) approach:
- Make a call to some QRS endpoint, just to force an authentication with the proxy service.
- Capture the session cookie and keep track of the session ID that is stored in that cookie.
- The cookie name is set per virtual proxy in the QMC.
- Use the session ID when calling the Sense APIs involved in the Ctrl-Q that's to be carried out
- Before exiting, close the session via enigma.js, as is done today.
- Return the session ID from each of the functions that implement Ctrl-Q's various commands.
- This will enable outside code (e.g. unit tests) to clear up sessions using the QPS, if needed.
While this works, it means the 5-concurrent-sessions limit will be reached sooner or later.
The sessions will eventually (depending on the session timeout setting in the QMC) time out and be deleted, but that timeout is by default 30 minutes.
A better (?) approach: