mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
use new queue
This commit is contained in:
parent
adbf694222
commit
61ba0670f2
@ -30,9 +30,12 @@ class API extends Server {
|
||||
limits: {},
|
||||
}
|
||||
|
||||
queuesManager = new TaskQueueManager({
|
||||
queuesManager = new TaskQueueManager(
|
||||
{
|
||||
workersPath: `${__dirname}/queues`,
|
||||
})
|
||||
},
|
||||
this,
|
||||
)
|
||||
|
||||
async onInitialize() {
|
||||
global.sse = this.contexts.SSEManager
|
||||
|
@ -29,7 +29,7 @@ export default {
|
||||
transmuxOptions: transmuxOptions,
|
||||
cachePath: cachePath,
|
||||
onProgress: (progress) => {
|
||||
job.progress(progress)
|
||||
job.updateProgress(progress)
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -60,7 +60,9 @@ export default {
|
||||
|
||||
if (req.headers["transmux"] || limits.useCompression === true) {
|
||||
// add a background task
|
||||
const job = await global.queues.createJob("remote_upload", {
|
||||
const job = await global.queues.createJob(
|
||||
"remote_upload",
|
||||
{
|
||||
filePath: build.filePath,
|
||||
parentDir: req.auth.session.user_id,
|
||||
service: limits.useProvider,
|
||||
@ -68,7 +70,11 @@ export default {
|
||||
transmux: req.headers["transmux"] ?? false,
|
||||
transmuxOptions: req.headers["transmux-options"],
|
||||
cachePath: tmpPath,
|
||||
})
|
||||
},
|
||||
{
|
||||
useSSE: true,
|
||||
},
|
||||
)
|
||||
|
||||
const sseChannelId = job.sseChannelId
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user