Skip to content

Commit

Permalink
fix: only one process syncs
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Apr 19, 2024
1 parent 35cd02a commit 758a145
Showing 1 changed file with 1 addition and 1 deletion.
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 Down

0 comments on commit 758a145

Please sign in to comment.