Skip to content

Commit 4355eef

Browse files
committed
Revert "feat: replace CronJob with in-process node-cron scheduler"
This reverts commit e737e30.
1 parent 22c43e1 commit 4355eef

7 files changed

Lines changed: 0 additions & 241 deletions

File tree

.yarn/install-state.gz

-547 Bytes
Binary file not shown.

api/helpers/scheduler.js

Lines changed: 0 additions & 92 deletions
This file was deleted.

app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var auth = require('./api/helpers/auth');
1111
var swaggerConfig = YAML.load('./api/swagger/swagger.yaml');
1212
var bodyParser = require('body-parser');
1313
var app_helper = require('./app_helper');
14-
var scheduler = require('./api/helpers/scheduler');
1514

1615
var api_default_port = 3000;
1716

@@ -85,9 +84,6 @@ swaggerTools.initializeMiddleware(swaggerConfig, function(middleware) {
8584
// Tests handle their own database connection to in-memory MongoDB
8685
if (process.env.NODE_ENV !== 'test') {
8786
app_helper.loadMongoose().then(() => {
88-
// Start the materialized views scheduler
89-
scheduler.startScheduler(defaultLog);
90-
9187
express_server = app.listen(api_default_port, '0.0.0.0', function() {
9288
defaultLog.info('Started server on port ' + api_default_port);
9389
});
@@ -105,9 +101,6 @@ swaggerTools.initializeMiddleware(swaggerConfig, function(middleware) {
105101
});
106102

107103
function shutdown() {
108-
// Stop the scheduler first
109-
scheduler.stopScheduler(defaultLog);
110-
111104
if (express_server) {
112105
console.log('Shutting down gracefully');
113106
express_server.close(() => {

helm/eagle-api/values.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ env:
7474
# Feature Flags
7575
ENABLE_VIRUS_SCANNING: "true"
7676

77-
# Scheduler Configuration
78-
# Cron schedule for materialized views updates (standard cron syntax)
79-
# Default: every 30 minutes. Set to 'disabled' to turn off.
80-
MATERIALIZED_VIEWS_CRON_SCHEDULE: "*/30 * * * *"
81-
8277
# External Services
8378
CHES_ENDPOINT: "" # Set in values-{env}.yaml
8479
GETOK_ENDPOINT: "" # Set in values-{env}.yaml

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"mongodb": "~4.17.2",
4949
"mongoose": "~6.13.6",
5050
"nconf": "^0.12.1",
51-
"node-cron": "^4.2.1",
5251
"path": "~0.12.7",
5352
"proj4": "~2.5.0",
5453
"qs": "^6.14.1",

test/helpers/scheduler.test.js

Lines changed: 0 additions & 128 deletions
This file was deleted.

yarn.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,7 +4265,6 @@ __metadata:
42654265
mongodb: "npm:~4.17.2"
42664266
mongoose: "npm:~6.13.6"
42674267
nconf: "npm:^0.12.1"
4268-
node-cron: "npm:^4.2.1"
42694268
path: "npm:~0.12.7"
42704269
proj4: "npm:~2.5.0"
42714270
qs: "npm:^6.14.1"
@@ -6730,13 +6729,6 @@ __metadata:
67306729
languageName: node
67316730
linkType: hard
67326731

6733-
"node-cron@npm:^4.2.1":
6734-
version: 4.2.1
6735-
resolution: "node-cron@npm:4.2.1"
6736-
checksum: 10c0/804df01df230e96fd2f8ffcde004f4d5af953bccdf3ccf993dc450526dd65f553a2f2ad4bc0faf55c90c38cbc99c9ddbb88ee16cba3fc6bc74e606da6efb249e
6737-
languageName: node
6738-
linkType: hard
6739-
67406732
"node-fs@npm:~0.1.5":
67416733
version: 0.1.7
67426734
resolution: "node-fs@npm:0.1.7"

0 commit comments

Comments
 (0)