mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-10 15:23:04 -07:00
feat: es6+mods and replace node-cron with croner
This commit is contained in:
parent
19c92ed244
commit
ea828c326f
9 changed files with 10437 additions and 374 deletions
|
@ -4,7 +4,7 @@ import logger from "morgan";
|
|||
import compression from "compression";
|
||||
import bearerToken from "express-bearer-token";
|
||||
import helmet from "helmet";
|
||||
import cron from "node-cron";
|
||||
import { Cron } from "croner";
|
||||
|
||||
import { db } from "./utils/db.js";
|
||||
import { initAdmin } from "./utils/init-admin.js";
|
||||
|
@ -63,7 +63,7 @@ initAdmin().then(function (admin) {
|
|||
|
||||
if (process.env.ZU_LAST_SEEN_FETCH !== "false") {
|
||||
let schedule = process.env.ZU_LAST_SEEN_SCHEDULE || "*/5 * * * *";
|
||||
cron.schedule(schedule, () => {
|
||||
Cron(schedule, () => {
|
||||
console.debug("Running scheduled job");
|
||||
const networks = db.get("networks").value();
|
||||
networks.forEach(async (network) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue