This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream your-application { | |
server 0.0.0.0:8080 weight=1 fail_timeout=1s; | |
server 0.0.0.0:8081 weight=1 fail_timeout=1s; | |
} | |
server { | |
listen 80; | |
server_name site-url.com; | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Agenda = require(`agenda`); | |
const agenda = new Agenda({db: {address: "MONGODB_CONNECTION_STRING_HERE"}}); | |
/** | |
* Concurrency set to 100 | |
*/ | |
agenda.maxConcurrency(100); | |
/** | |
* Lock life time set to 2 seconds |