Open kattjevfel opened 4 years ago
A lot of effort was put into this, from what I can gather all the timer stuff is gone, leaving only the delete function, however this doesn't work:
May 21 19:49:59 legacylewd node[374693]: Scanners:
May 21 19:49:59 legacylewd node[374693]: undefined
May 21 19:49:59 legacylewd node[374693]: Starting cronjob for undefined
May 21 19:49:59 legacylewd node[374693]: cronactions.js Error: listen EADDRINUSE: address already in use :::5004
May 21 19:49:59 legacylewd node[374693]: at Server.setupListenHandle [as _listen2] (net.js:1310:16)
May 21 19:49:59 legacylewd node[374693]: at listenInCluster (net.js:1358:12)
May 21 19:49:59 legacylewd node[374693]: at Server.listen (net.js:1444:7)
May 21 19:49:59 legacylewd node[374693]: at Function.listen (/var/www/lewd2/packages/actions/node_modules/express/lib/application.js:618:24)
May 21 19:49:59 legacylewd node[374693]: at Object.parcelRequire.Focm../Controllers/Cron/fileDeletion (/var/www/lewd2/packages/actions/dist/index.js:490:5)
May 21 19:49:59 legacylewd node[374693]: at newRequire (/var/www/lewd2/packages/actions/dist/index.js:47:24)
May 21 19:49:59 legacylewd node[374693]: at /var/www/lewd2/packages/actions/dist/index.js:81:7
May 21 19:49:59 legacylewd node[374693]: at Object.<anonymous> (/var/www/lewd2/packages/actions/dist/index.js:120:3)
May 21 19:49:59 legacylewd node[374693]: at Module._compile (internal/modules/cjs/loader.js:999:30)
May 21 19:49:59 legacylewd node[374693]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) {
May 21 19:49:59 legacylewd node[374693]: code: 'EADDRINUSE',
May 21 19:49:59 legacylewd node[374693]: errno: 'EADDRINUSE',
May 21 19:49:59 legacylewd node[374693]: syscall: 'listen',
May 21 19:49:59 legacylewd node[374693]: address: '::',
May 21 19:49:59 legacylewd node[374693]: port: 5004
May 21 19:49:59 legacylewd node[374693]: }
Should probably look at how it was done before, since the cron-stuff was always separate to begin with.
I reckon we could:
$ node dist/main.js
once, and have a standalone systemd timer that basically does that
Simplify cron stuff to only do delete actions, leave rest for systemd timer