diff --git a/scripts/run-in-container/create-juxt-community.js b/scripts/run-in-container/create-juxt-community.js index 7dc5867..e3f2d7d 100644 --- a/scripts/run-in-container/create-juxt-community.js +++ b/scripts/run-in-container/create-juxt-community.js @@ -1,6 +1,5 @@ // This should be evaled in the juxtaposition-ui container require("module-alias/register"); -const mongoose = require("mongoose"); const { connect } = require("./src/database"); const { COMMUNITY } = require("./src/models/communities"); const fs = require("fs").promises; @@ -24,8 +23,6 @@ async function runAsync() { process.argv[4], process.argv[5] ); - - await mongoose.connection.close(); } runAsync().then(() => { diff --git a/scripts/run-in-container/make-pnid-dev.js b/scripts/run-in-container/make-pnid-dev.js index 212dd95..818069b 100644 --- a/scripts/run-in-container/make-pnid-dev.js +++ b/scripts/run-in-container/make-pnid-dev.js @@ -1,5 +1,4 @@ // This should be evaled in the account container -const mongoose = require("mongoose"); const { connect } = require("./dist/database"); const { PNID } = require("./dist/models/pnid"); @@ -18,11 +17,8 @@ async function runAsync() { await updatePnidAccessLevel(pnid, 3, "dev"); } else { console.error(`No PNID found for username ${process.argv[1]}.`); - await mongoose.connection.close(); - process.exit(2); + process.exit(1); } - - await mongoose.connection.close(); } runAsync().then(() => { diff --git a/scripts/run-in-container/update-account-servers-database.js b/scripts/run-in-container/update-account-servers-database.js index e599632..02a8b27 100644 --- a/scripts/run-in-container/update-account-servers-database.js +++ b/scripts/run-in-container/update-account-servers-database.js @@ -1,5 +1,4 @@ // This should be evaled in the account container -const mongoose = require("mongoose"); const { connect } = require("./dist/database"); const { Server } = require("./dist/models/server"); @@ -101,8 +100,6 @@ async function runAsync() { 1, "0".repeat(64) ); - - await mongoose.connection.close(); } runAsync().then(() => { diff --git a/scripts/run-in-container/update-miiverse-endpoints.js b/scripts/run-in-container/update-miiverse-endpoints.js index 621fd20..c02efb3 100644 --- a/scripts/run-in-container/update-miiverse-endpoints.js +++ b/scripts/run-in-container/update-miiverse-endpoints.js @@ -1,5 +1,4 @@ // This should be evaled in the miiverse-api container -const mongoose = require("mongoose"); const { connect } = require("./dist/database"); const { Endpoint } = require("./dist/models/endpoint"); @@ -15,8 +14,6 @@ async function runAsync() { "portal.olv.pretendo.cc", "ctr.olv.pretendo.cc" ); - - await mongoose.connection.close(); } runAsync().then(() => {