Feat: Implement data clearing logic & frontend

This commit is contained in:
Nelson Chan
2021-10-09 23:33:47 +08:00
parent 656a4d6270
commit dca5a59dbc
5 changed files with 90 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ const { SHARE_ENV } = require("worker_threads");
const jobs = [
{
name: "clear-old-data",
interval: "every 1 minute",
interval: "every 1 day",
}
];
@@ -17,6 +17,9 @@ const initBackgroundJobs = function (args) {
env: SHARE_ENV,
workerData: args,
},
workerMessageHandler: (message) => {
console.log("[Background Job]:", message);
}
});
bree.start();