diff --git a/src/lib/classes/RenderJob.js b/src/lib/classes/RenderJob.js index 8a0d840..b423961 100644 --- a/src/lib/classes/RenderJob.js +++ b/src/lib/classes/RenderJob.js @@ -1,4 +1,5 @@ const { readFile } = require("fs/promises") +const chalk = require('chalk') const Job = require("./Job.js") const logger = require("../logger.js") @@ -13,7 +14,7 @@ class RenderJob extends Job { if (!started) throw new Error("RCCService failed to start") if (!this.client) await this.CreateClient() - logger.info(`[${this.id}] Headshot RenderJob started for ${id}`) + logger.info(`${chalk.gray(`[${this.id}]`)} Headshot RenderJob started for ${id}`) const result = await this.OpenJobEx({ name: this.id, @@ -34,7 +35,7 @@ class RenderJob extends Job { }, }).catch((e) => false) - logger.info(`[${this.id}] Headshot RenderJob finished for ${id}`) + logger.info(`${chalk.gray(`[${this.id}]`)} Headshot RenderJob finished for ${id}`) await this.Stop() @@ -48,8 +49,8 @@ class RenderJob extends Job { if (!started) throw new Error("RCCService failed to start") if (!this.client) await this.CreateClient() - if (three_d) logger.info(`[${this.id}] 3D Bodyshot RenderJob started for ${id}`) - else logger.info(`[${this.id}] Bodyshot RenderJob started for ${id}`) + if (three_d) logger.info(`${chalk.gray(`[${this.id}]`)} 3D Bodyshot RenderJob started for ${id}`) + else logger.info(`${chalk.gray(`[${this.id}]`)} Bodyshot RenderJob started for ${id}`) const result = await this.OpenJobEx({ name: this.id, @@ -70,8 +71,8 @@ class RenderJob extends Job { }, }).catch((e) => false) - if (three_d) logger.info(`[${this.id}] 3D Bodyshot RenderJob finished for ${id}`) - else logger.info(`[${this.id}] Bodyshot RenderJob finished for ${id}`) + if (three_d) logger.info(`${chalk.gray(`[${this.id}]`)} 3D Bodyshot RenderJob finished for ${id}`) + else logger.info(`${chalk.gray(`[${this.id}]`)} Bodyshot RenderJob finished for ${id}`) await this.Stop() @@ -85,8 +86,8 @@ class RenderJob extends Job { if (!started) throw new Error("RCCService failed to start") if (!this.client) await this.CreateClient() - if (three_d) logger.info(`[${this.id}] 3D Asset RenderJob started for ${id}`) - else logger.info(`[${this.id}] Asset RenderJob started for ${id}`) + if (three_d) logger.info(`${chalk.gray(`[${this.id}]`)} 3D Asset RenderJob started for ${id}`) + else logger.info(`${chalk.gray(`[${this.id}]`)} Asset RenderJob started for ${id}`) const result = await this.OpenJobEx({ name: this.id, @@ -108,8 +109,8 @@ class RenderJob extends Job { }, }).catch((e) => false) - if (three_d) logger.info(`[${this.id}] 3D Asset RenderJob finished for ${id}`) - else logger.info(`[${this.id}] Asset RenderJob finished for ${id}`) + if (three_d) logger.info(`${chalk.gray(`[${this.id}]`)} 3D Asset RenderJob finished for ${id}`) + else logger.info(`${chalk.gray(`[${this.id}]`)} Asset RenderJob finished for ${id}`) await this.Stop() @@ -128,7 +129,7 @@ class RenderJob extends Job { if (!started) throw new Error("RCCService failed to start") if (!this.client) await this.CreateClient() - logger.info(`[${this.id}] Place RenderJob started for ${id}`) + logger.info(`${chalk.gray(`[${this.id}]`)} Place RenderJob started for ${id}`) const result = await this.OpenJobEx({ name: this.id, @@ -149,7 +150,7 @@ class RenderJob extends Job { }, }).catch((e) => false) - logger.info(`[${this.id}] Place RenderJob finished for ${id}`) + logger.info(`${chalk.gray(`[${this.id}]`)} Place RenderJob finished for ${id}`) await this.Stop()