🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

@hsl-openmaas/operation-manager

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hsl-openmaas/operation-manager

Client to store and send HTTP request blueprints for retrying or reversion

0.1.11
latest
npm
Version published
Maintainers
3
Created
Source

OperationManager class

A client to store persistent operations that are executed asynchronously by the operations-microservice. Works by receiving operations from the host application and pushing them into an Azure Service Bus queue which is monitored by the operations-microservice.

An instance of the OperationManager contains an array for reverting operations and operations to revert. These arrays get appended by its makeRequest property method, and their contents may finally be sent to the queue using the saveRevertingOps property method.

Property method makeRequest

Executes an HTTP request, queues up its complete operation and stores any given reverting requests into property variable revertingOps on success. Throws the request error if occurs.

Static method makeRetryableRequest

Executes an HTTP request and sends it to a provided queue as either a tryable or complete operation depending on its outcome. Swallows the request error if occurs to not interrupt parent program flow.

Property method saveRevertingOps

Takes whatever is stored in the revertingOps and opsToRevert property variables and queues them up

FAQs

Package last updated on 10 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts