Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/biothings/bte-server into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Apr 19, 2024
2 parents 1d2efd1 + 59c2260 commit b0ebbfa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controllers/cron/update_local_smartapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export default function manageSmartApi() {
[
process.env.SMARTAPI_SYNC !== "false", // Shouldn't be explicitly disabled
process.env.NODE_ENV === "production", // Should be in production mode
process.env.INSTANCE_ID !== "0", // Only one PM2 cluster instance should sync
process.env.INSTANCE_ID && process.env.INSTANCE_ID === "0", // Only one PM2 cluster instance should sync
].every(condition => condition);

if (!should_sync) {
Expand All @@ -434,7 +434,6 @@ export default function manageSmartApi() {
updateSmartAPISpecs()
.then(() => {
debug("SmartAPI sync successful.");
process.exit(0);
})
.catch(err => {
debug(`Updating local copy of SmartAPI specs failed! The error message is ${err.toString()}`);
Expand Down

0 comments on commit b0ebbfa

Please sign in to comment.