https://github.com/bitcoin-api/bqe
NodeJS Background Executor Function
https://github.com/bitcoin-api/bqe
Last synced: 8 months ago
JSON representation
NodeJS Background Executor Function
- Host: GitHub
- URL: https://github.com/bitcoin-api/bqe
- Owner: bitcoin-api
- License: bsd-3-clause
- Created: 2020-07-23T23:45:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T00:33:09.000Z (over 5 years ago)
- Last Synced: 2025-06-09T08:59:17.469Z (9 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bqe
[](https://badge.fury.io/js/bqe)
bqe - Background Queue Executor
## About
Execute asynchronous operations in sequence in the background
## Example
When your code starts up:
```.js
'use strict';
const bqe = require( 'bqe' );
bqe.start();
```
When you want to add an operation to the background execution queue:
```.js
'use strict';
const bqe = require( 'bqe' );
bqe.addOperation({
operation: async () => {
await new Promise( resolve => {
setTimeout( () => {
console.log( 'operation in background log' );
resolve();
}, 1000 );
});
}
});
```