fix: convex fucked up tmpdir
This commit is contained in:
2 files changed
+2
-5
No files matched your search
+1
-4
@@ -5,7 +5,6 @@ import { api } from "./_generated/api"
|
||||
import * as fs from "node:fs/promises"
|
||||
import * as fsSync from "node:fs"
|
||||
import * as music from "music-metadata"
|
||||
import * as os from "node:os"
|
||||
import * as path from "node:path"
|
||||
import { ConvexError } from "convex/values"
|
||||
|
||||
@@ -15,7 +14,7 @@ import { action, type ActionCtx } from "./_generated/server"
|
||||
const DATA_DIR = process.env.CONVEX_SITE_URL?.includes("127.0.0.1")
|
||||
? "/Volumes/FastStorage/Apple Music"
|
||||
: process.env.DATA || "/data"
|
||||
const HLS_CACHE_DIR = path.join(os.tmpdir(), "../otunes-hls")
|
||||
const HLS_CACHE_DIR = "/tmp/otunes"
|
||||
const HLS_MAX_IDLE_MS = 30 * 60 * 1000
|
||||
|
||||
async function cleanHlsStreamsOlderThan(maxIdleMs: number) {
|
||||
@@ -23,8 +22,6 @@ async function cleanHlsStreamsOlderThan(maxIdleMs: number) {
|
||||
let checked = 0
|
||||
let removed = 0
|
||||
let failed = 0
|
||||
console.log(os.tmpdir())
|
||||
console.log(HLS_CACHE_DIR)
|
||||
|
||||
let entries: fsSync.Dirent[] = []
|
||||
try {
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ export function selectHlsSourceCodec(
|
||||
}
|
||||
|
||||
function hlsCacheRoot() {
|
||||
return path.join(os.tmpdir(), "otunes-hls")
|
||||
return "/tmp/otunes"
|
||||
}
|
||||
|
||||
async function hlsJobKey(
|
||||
|
||||
Reference in new issue
Block a user