GUI-STUDIO commited on
Commit ·
8fc9264
1
Parent(s): d4a8291
Convert environment variables to functions
Browse filesRefactor static environment variable declarations across the codebase
into
functions to allow for dynamic evaluation.
- src/lib/bucket.ts +1 -1
- src/sub-router/showtime.ts +7 -7
src/lib/bucket.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const STORAGE_ROOT =
|
|
| 12 |
|
| 13 |
export const repo: RepoDesignation = {
|
| 14 |
type: "bucket",
|
| 15 |
-
name: HF_BUCKET_REPO
|
| 16 |
};
|
| 17 |
|
| 18 |
export const credentials: { accessToken: AccessToken } = {
|
|
|
|
| 12 |
|
| 13 |
export const repo: RepoDesignation = {
|
| 14 |
type: "bucket",
|
| 15 |
+
name: HF_BUCKET_REPO || ""
|
| 16 |
};
|
| 17 |
|
| 18 |
export const credentials: { accessToken: AccessToken } = {
|
src/sub-router/showtime.ts
CHANGED
|
@@ -396,7 +396,7 @@ async function F_handle_process(arg0: {
|
|
| 396 |
|
| 397 |
const S3Dir = path.join(STORAGE_ROOT, `${cache_folder}`);
|
| 398 |
|
| 399 |
-
const tmp_file_name = `${Date.now()}${picture_quality ? `-${picture_quality.trim()}` : ""}-${output_destination}`;
|
| 400 |
|
| 401 |
let tmp_download_path: string | null | undefined = await (async () => {
|
| 402 |
if (!is_download) return;
|
|
@@ -1142,13 +1142,13 @@ async function F_handle_process(arg0: {
|
|
| 1142 |
S3Dir
|
| 1143 |
});
|
| 1144 |
|
| 1145 |
-
console.log(
|
| 1146 |
-
"FOUND A FILE TO DOCUMENT ============ ",
|
| 1147 |
-
found_file?.path,
|
| 1148 |
-
"\n"
|
| 1149 |
-
);
|
| 1150 |
-
|
| 1151 |
if (typeof found_file?.path === "string" && found_file.path.trim()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1152 |
const _file_to_serve = await serve_download({
|
| 1153 |
file_path: found_file.path.trim(),
|
| 1154 |
job_id,
|
|
|
|
| 396 |
|
| 397 |
const S3Dir = path.join(STORAGE_ROOT, `${cache_folder}`);
|
| 398 |
|
| 399 |
+
const tmp_file_name = `${Date.now()}${picture_quality && picture_quality.trim() ? `-${picture_quality.trim()}` : ""}-${output_destination}`;
|
| 400 |
|
| 401 |
let tmp_download_path: string | null | undefined = await (async () => {
|
| 402 |
if (!is_download) return;
|
|
|
|
| 1142 |
S3Dir
|
| 1143 |
});
|
| 1144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1145 |
if (typeof found_file?.path === "string" && found_file.path.trim()) {
|
| 1146 |
+
console.log(
|
| 1147 |
+
"FOUND A FILE TO DOCUMENT ============ ",
|
| 1148 |
+
found_file?.path,
|
| 1149 |
+
"\n"
|
| 1150 |
+
);
|
| 1151 |
+
|
| 1152 |
const _file_to_serve = await serve_download({
|
| 1153 |
file_path: found_file.path.trim(),
|
| 1154 |
job_id,
|