Add dotenv support and bulk SMS endpoint
- Integrated dotenv for environment variable management. - Updated queueWorker to use WORKER_INTERVAL from .env or default to 5 seconds. - Added a new bulk SMS endpoint to queue multiple messages in a single request, with validation and transaction handling. - Updated package.json and package-lock.json to include dotenv dependency.
This commit is contained in:
@@ -45,7 +45,7 @@ function startQueueWorker(io) {
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 5000); // Check every 5 seconds
|
||||
}, parseInt(process.env.WORKER_INTERVAL) || 5000); // Check based on interval from .env or default to 5 seconds
|
||||
}
|
||||
|
||||
module.exports = startQueueWorker;
|
||||
|
||||
Reference in New Issue
Block a user