Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f21b53b81d | |||
0bf3b2ea8b |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/taskbuffer",
|
"name": "@pushrocks/taskbuffer",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/taskbuffer",
|
"name": "@pushrocks/taskbuffer",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "flexible task management. TypeScript ready!",
|
"description": "flexible task management. TypeScript ready!",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -5,7 +5,7 @@ let testTaskRunner: taskbuffer.TaskRunner;
|
|||||||
|
|
||||||
tap.test('should create a valid taskrunner', async () => {
|
tap.test('should create a valid taskrunner', async () => {
|
||||||
testTaskRunner = new taskbuffer.TaskRunner();
|
testTaskRunner = new taskbuffer.TaskRunner();
|
||||||
testTaskRunner.start();
|
await testTaskRunner.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should execute task when its scheduled', async (tools) => {
|
tap.test('should execute task when its scheduled', async (tools) => {
|
||||||
|
@ -33,7 +33,7 @@ export class TaskRunner {
|
|||||||
/**
|
/**
|
||||||
* starts the task queue
|
* starts the task queue
|
||||||
*/
|
*/
|
||||||
public start() {
|
public async start() {
|
||||||
this.status = 'running';
|
this.status = 'running';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export class TaskRunner {
|
|||||||
/**
|
/**
|
||||||
* stops the task queue
|
* stops the task queue
|
||||||
*/
|
*/
|
||||||
public stop() {
|
public async stop() {
|
||||||
this.status = 'stopped';
|
this.status = 'stopped';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user