-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scan/backend: Refactor PDI scanner client creation (#5684)
* scan/backend: Refactor PDI scanner client creation Instead of passing a function to create a PDI scanner client to the state machine, create the client in the server.ts module and pass it into the state machine. In previous scanner integrations, we wanted to create new clients after failures. However, in this integration, we don't do that and instead just crash the app (part of our "fail fast" approach), so we don't ever need to recreate the client. This refactor also prepares for introducing a mock PDI scanner client, which will also be a singleton. Since it will be referenced by the dev dock as well, it will need to be created in server.ts. * Don't store client in state machine context This is also a remnant of creating multiple clients.
- Loading branch information
1 parent
244cef2
commit beb78d9
Showing
4 changed files
with
40 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters