Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bull-stepfunction
Advanced tools
A Node.js module for controlling queues and jobs using StepFunction JSON format with Bull queues.
bull-stepfunction
is a Node.js module that provides the ability to control queues and jobs using StepFunction JSON format. It leverages the power of Bull queues to manage asynchronous tasks and offers an intuitive way to structure job execution using StepFunction-like syntax.
You can install bull-stepfunction
using npm:
npm install bull-stepfunction
const {StepFunction} =require("bull-stepfunction");
const Queue =require("bull");
const path =require("path");
const testjobQ = require("./testJob")
const testjobQ1 = require("./testJob1")
const testjobQ2 = require("./testJob2")
const testQ = new Queue("fetch", "redis://127.0.0.1:6381");
const testQ1 = new Queue("fetch1", "redis://127.0.0.1:6381");
const testQ2 = new Queue("fetch2", "redis://127.0.0.1:6381");
testQ.process(20, testjobQ)
testQ1.process(20, testjobQ1)
testQ2.process(20, testjobQ2)
let sf = new StepFunction(path.join(__dirname, './simple.asl.json'),{testjob:testQ,testjob1:testQ1,testjob2:testQ2},{loging:false,redis:"redis://127.0.0.1:6381"})
sf.init({d:[{ss:"ss"},{dd:"dd"},{ff:"ff"}]})
sf.on('complete',(result)=>{
console.log("step function process has been finished , final result is :",result)
})
first we import package with
const {StepFunction} =require("bull-stepfunction");
after that we define it with new StepFunction
let sf = new StepFunction(path.join(__dirname, './simple.asl.json'),{testjob:testQ,testjob1:testQ1,testjob2:testQ2},{loging:false,redis:"redis://127.0.0.1:6381"})
this will get three arguments
after that we init the class with data we want to pass to it
sf.init({d:[{ss:"ss"},{dd:"dd"},{ff:"ff"}]})
and we could run code in complete
event
sf.on('complete',({workflowId,data})=>{
console.log("step function process has been finished ")
})
For more examples, please check the examples directory.
Contributions are welcome! Please read the Contributing Guidelines for more information.
FAQs
run bullQ job like AWS stepfunction
The npm package bull-stepfunction receives a total of 0 weekly downloads. As such, bull-stepfunction popularity was classified as not popular.
We found that bull-stepfunction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.