bqe

1.0.5 • Public • Published

bqe

npm version

bqe - Background Queue Executor

About

Execute asynchronous operations in sequence in the background

Example

When your code starts up:

'use strict';
 
const bqe = require( 'bqe' );
 
 
bqe.start();

When you want to add an operation to the background execution queue:

'use strict';
 
const bqe = require( 'bqe' );
 
 
bqe.addOperation({
 
    operation: async () => {
 
        await new Promise( resolve => {
 
            setTimeout( () => {
 
                console.log( 'operation in background log' );
 
                resolve();
 
            }, 1000 );
        });
    }
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.5
    1
  • 1.0.3
    1
  • 1.0.2
    1

Package Sidebar

Install

npm i bqe

Weekly Downloads

3

Version

1.0.5

License

BSD-3-Clause

Unpacked Size

4.57 kB

Total Files

7

Last publish

Collaborators

  • bitcoin-api.io