update
This commit is contained in:
@@ -10,3 +10,9 @@ services:
|
|||||||
|
|
||||||
mem_limit: 50m
|
mem_limit: 50m
|
||||||
cpus: 0.01
|
cpus: 0.01
|
||||||
|
networks:
|
||||||
|
- scheduler-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
scheduler-net:
|
||||||
|
external: true
|
||||||
|
|||||||
10
index.js
10
index.js
@@ -14,7 +14,9 @@ cron.schedule(
|
|||||||
async () => {
|
async () => {
|
||||||
const module = "Birthday Notification";
|
const module = "Birthday Notification";
|
||||||
try {
|
try {
|
||||||
let res = await axios.get("http://36.66.3.44:7010/birthday-notification");
|
let res = await axios.get(
|
||||||
|
"http://email-notification:9997/birthday-notification",
|
||||||
|
);
|
||||||
console.log(module, "success", res.data);
|
console.log(module, "success", res.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(module, "error", error.message);
|
console.error(module, "error", error.message);
|
||||||
@@ -22,7 +24,7 @@ cron.schedule(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
timezone: "Asia/Jakarta",
|
timezone: "Asia/Jakarta",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
cron.schedule(
|
cron.schedule(
|
||||||
@@ -31,7 +33,7 @@ cron.schedule(
|
|||||||
const module = "Workanniversary";
|
const module = "Workanniversary";
|
||||||
try {
|
try {
|
||||||
let res = await axios.get(
|
let res = await axios.get(
|
||||||
"http://36.66.3.44:7010/workanniversary-notification"
|
"http://email-notification:9997/workanniversary-notification",
|
||||||
);
|
);
|
||||||
console.log(module, "success", res.data);
|
console.log(module, "success", res.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -40,7 +42,7 @@ cron.schedule(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
timezone: "Asia/Jakarta",
|
timezone: "Asia/Jakarta",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
app.use((req, res) => {
|
app.use((req, res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user