mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
rename prodnew to prod
This commit is contained in:
parent
470c4c4e51
commit
aa92d759ea
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ module.exports = {
|
||||||
onBefore: context => context.user.isClientOwner,
|
onBefore: context => context.user.isClientOwner,
|
||||||
onCancel: () => { },
|
onCancel: () => { },
|
||||||
run: async (context) => {
|
run: async (context) => {
|
||||||
if (process.env.environment !== "prodnew") return await editOrReply(context, createEmbed("error", context, "Cannot deploy on this instance."))
|
if (process.env.environment.toLowerCase() !== "prod") return await editOrReply(context, createEmbed("error", context, "Cannot deploy on this instance."))
|
||||||
await editOrReply(context, createEmbed("loading", context, "Querying deploy..."))
|
await editOrReply(context, createEmbed("loading", context, "Querying deploy..."))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
4
index.js
4
index.js
|
@ -9,7 +9,7 @@ const token = process.env.token;
|
||||||
// Get the correct path for each environment type
|
// Get the correct path for each environment type
|
||||||
let client = `../${__dirname}/labscore/client.js`
|
let client = `../${__dirname}/labscore/client.js`
|
||||||
if(process.env.environment == "local") client = `./labscore/client.js`
|
if(process.env.environment == "local") client = `./labscore/client.js`
|
||||||
if(process.env.environment == "prodnew") client = `./labscore/labscore/client.js`;
|
if(process.env.environment.toLowerCase() == "prod") client = `./labscore/labscore/client.js`;
|
||||||
|
|
||||||
const SHARDS = process.env.SHARDS || 2;
|
const SHARDS = process.env.SHARDS || 2;
|
||||||
const SHARDS_PER_CLUSTER = process.env.SHARDS_PER_CLUSTER_OVERRIDE || 2;
|
const SHARDS_PER_CLUSTER = process.env.SHARDS_PER_CLUSTER_OVERRIDE || 2;
|
||||||
|
@ -36,7 +36,7 @@ const manager = new ClusterManager(client, token, {
|
||||||
await manager.run();
|
await manager.run();
|
||||||
console.log(`v2 | ready. took ${(Date.now() - time) / 1000}.`)
|
console.log(`v2 | ready. took ${(Date.now() - time) / 1000}.`)
|
||||||
|
|
||||||
if(process.env.environment == "prodnew"){
|
if(process.env.environment.toLowerCase() == "prod"){
|
||||||
let liveDeploy = await superagent.get(`${process.env.PB_MANAGER_HOST}_pbs/v1/GetPbServiceId`)
|
let liveDeploy = await superagent.get(`${process.env.PB_MANAGER_HOST}_pbs/v1/GetPbServiceId`)
|
||||||
if(process.env.HOSTNAME !== liveDeploy.body.d){
|
if(process.env.HOSTNAME !== liveDeploy.body.d){
|
||||||
console.log(`[${process.env.HOSTNAME}] invalid deployment session`)
|
console.log(`[${process.env.HOSTNAME}] invalid deployment session`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue