fix - async task manager - running same task several times!!!
MODIFY
src/async-task/AsyncTaskManager.ts
src/async-task/AsyncTaskManager.ts
@@ -64,7 +64,6 @@ export default class AsyncTaskManager {
const asyncTasks = await AsyncTaskStorage.getAsyncTasks(
{ status: AsyncTaskStatus.PENDING }, Constants.DB_PARAMS_MAX_LIMIT);
// Process them
- let abstractAsyncTask: AbstractAsyncTask;
if (!Utils.isEmptyArray(asyncTasks.result)) {
await Logging.logInfo({
tenantID: Constants.DEFAULT_TENANT,
@@ -75,6 +74,7 @@ export default class AsyncTaskManager {
await Promise.map(asyncTasks.result,
async (asyncTask: AsyncTask) => {
// Tasks
+ let abstractAsyncTask: AbstractAsyncTask;
switch (asyncTask.name) {
case AsyncTasks.BILL_TRANSACTION:
abstractAsyncTask = new BillTransactionAsyncTask(asyncTask);

fix - async task manager - running same task several times!!!