simple-async-tasks
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -41,3 +41,3 @@ "use strict"; | ||
if ((taskFound === null || taskFound === void 0 ? void 0 : taskFound.status) === AsyncTask_1.AsyncTaskStatus.QUEUED) { | ||
log.debug('skipped adding task to queue. reason: task is already queued', { | ||
log.debug('enqueueTask.progress: skipped adding task to queue. reason: task is already queued', { | ||
task: taskFound, | ||
@@ -48,3 +48,3 @@ }); | ||
if ((taskFound === null || taskFound === void 0 ? void 0 : taskFound.status) === AsyncTask_1.AsyncTaskStatus.ATTEMPTED) { | ||
log.debug('skipped adding task to queue. reason: task is already being attempted from queue', { | ||
log.debug('enqueueTask.progress: skipped adding task to queue. reason: task is already being attempted from queue', { | ||
task: taskFound, | ||
@@ -55,3 +55,3 @@ }); | ||
if ((taskFound === null || taskFound === void 0 ? void 0 : taskFound.status) === AsyncTask_1.AsyncTaskStatus.FULFILLED) { | ||
log.debug('skipped adding task to queue. reason: task was already fulfilled', { | ||
log.debug('enqueueTask.progress: skipped adding task to queue. reason: task was already fulfilled', { | ||
task: taskFound, | ||
@@ -62,3 +62,3 @@ }); | ||
if ((taskFound === null || taskFound === void 0 ? void 0 : taskFound.status) === AsyncTask_1.AsyncTaskStatus.CANCELED) { | ||
log.debug('skipped adding task to queue. reason: task was already canceled', { | ||
log.debug('enqueueTask.progress: skipped adding task to queue. reason: task was already canceled', { | ||
task: taskFound, | ||
@@ -72,4 +72,5 @@ }); | ||
const taskToQueue = Object.assign(Object.assign({}, taskReadyToQueue), { status: AsyncTask_1.AsyncTaskStatus.QUEUED }); | ||
log.debug('adding task to queue', { | ||
log.debug('enqueueTask.progress: adding task to queue', { | ||
task: taskToQueue, | ||
queue: { type: queue.type }, | ||
}); | ||
@@ -89,2 +90,6 @@ yield (() => __awaiter(void 0, void 0, void 0, function* () { | ||
}))(); | ||
log.debug('enqueueTask.progress: added task to queue', { | ||
task: taskToQueue, | ||
queue: { type: queue.type }, | ||
}); | ||
// and save that it has been queued | ||
@@ -91,0 +96,0 @@ return yield dao.upsert({ |
@@ -70,7 +70,7 @@ "use strict"; | ||
if (foundTask.status === AsyncTask_1.AsyncTaskStatus.FULFILLED) { | ||
log.warn('attempted to execute a task that has already been fulfilled. skipping', { task: foundTask }); | ||
log.warn('executeTask.progress: attempted to execute a task that has already been fulfilled. skipping', { task: foundTask }); | ||
return { task: foundTask }; | ||
} | ||
if (foundTask.status === AsyncTask_1.AsyncTaskStatus.CANCELED) { | ||
log.warn('attempted to execute a task that has already been canceled. skipping', { task: foundTask }); | ||
log.warn('executeTask.progress: attempted to execute a task that has already been canceled. skipping', { task: foundTask }); | ||
return { task: foundTask }; | ||
@@ -77,0 +77,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "A simple in-memory queue, for nodejs and the browser, with consumers for common usecases.", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"repository": "ehmpathy/simple-async-tasks", | ||
@@ -8,0 +8,0 @@ "homepage": "https://github.com/ehmpathy/simple-async-tasks", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50984
617