Fix ERR_BUFFER_OUT_OF_BOUNDS on some node version

This commit is contained in:
Chocobozzz 2024-11-25 09:14:04 +01:00
parent d56be1ce34
commit c3544d80b5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 10 additions and 19 deletions

View File

@ -118,7 +118,7 @@
"bcrypt": "5.1.1", "bcrypt": "5.1.1",
"bencode": "^4.0.0", "bencode": "^4.0.0",
"bluebird": "^3.5.0", "bluebird": "^3.5.0",
"bullmq": "^5.3.0", "bullmq": "^5.29.1",
"bytes": "^3.0.0", "bytes": "^3.0.0",
"chokidar": "^3.4.2", "chokidar": "^3.4.2",
"commander": "^12.0.0", "commander": "^12.0.0",

View File

@ -28,7 +28,6 @@ import {
VideoTranscodingPayload, VideoTranscodingPayload,
VideoTranscriptionPayload VideoTranscriptionPayload
} from '@peertube/peertube-models' } from '@peertube/peertube-models'
import { parseDurationToMs } from '@server/helpers/core-utils.js'
import { jobStates } from '@server/helpers/custom-validators/jobs.js' import { jobStates } from '@server/helpers/custom-validators/jobs.js'
import { CONFIG } from '@server/initializers/config.js' import { CONFIG } from '@server/initializers/config.js'
import { processVideoRedundancy } from '@server/lib/job-queue/handlers/video-redundancy.js' import { processVideoRedundancy } from '@server/lib/job-queue/handlers/video-redundancy.js'
@ -512,14 +511,6 @@ class JobQueue {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
async removeOldJobs () {
for (const key of Object.keys(this.queues)) {
const queue: Queue = this.queues[key]
await queue.clean(parseDurationToMs('7 days'), 1000, 'completed')
await queue.clean(parseDurationToMs('7 days'), 1000, 'failed')
}
}
private addRepeatableJobs () { private addRepeatableJobs () {
this.queues['videos-views-stats'].add('job', {}, { this.queues['videos-views-stats'].add('job', {}, {
repeat: REPEAT_JOBS['videos-views-stats'], repeat: REPEAT_JOBS['videos-views-stats'],

View File

@ -3770,14 +3770,14 @@ builtins@^5.0.1:
dependencies: dependencies:
semver "^7.0.0" semver "^7.0.0"
bullmq@^5.3.0: bullmq@^5.29.1:
version "5.12.7" version "5.29.1"
resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-5.12.7.tgz#69d2f1bc4a3546c32a539e891ba7c45f6e72c932" resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-5.29.1.tgz#9526747baac588e53665bb85a1fbdb544a17c1d3"
integrity sha512-xOUUto/ou6TQaAFhoybzeBNImPe6A07bEVB10ybnw/9fZNfu8lZXhex9EInGeq/r2UmYWw7CiNR9sIe5tfOf2w== integrity sha512-TZWiwRlPnpaN+Qwh4D8IQf2cYLpkiDX1LbaaWEabc6y37ojIttWOSynxDewpVHyW233LssSIC4+aLMSvAjtpmg==
dependencies: dependencies:
cron-parser "^4.6.0" cron-parser "^4.6.0"
ioredis "^5.4.1" ioredis "^5.4.1"
msgpackr "^1.10.1" msgpackr "^1.11.2"
node-abort-controller "^3.1.1" node-abort-controller "^3.1.1"
semver "^7.5.4" semver "^7.5.4"
tslib "^2.0.0" tslib "^2.0.0"
@ -7902,10 +7902,10 @@ msgpackr-extract@^3.0.2:
"@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3" "@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3" "@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3"
msgpackr@^1.10.1: msgpackr@^1.11.2:
version "1.11.0" version "1.11.2"
resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.0.tgz#8321d52333048cadc749f56385e3231e65337091" resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.2.tgz#4463b7f7d68f2e24865c395664973562ad24473d"
integrity sha512-I8qXuuALqJe5laEBYoFykChhSXLikZmUhccjGsPuSJ/7uPip2TJ7lwdIQwWSAi0jGZDXv4WOP8Qg65QZRuXxXw== integrity sha512-F9UngXRlPyWCDEASDpTf6c9uNhGPTqnTeLVt7bN+bU1eajoR/8V9ys2BRaV5C/e5ihE6sJ9uPIKaYt6bFuO32g==
optionalDependencies: optionalDependencies:
msgpackr-extract "^3.0.2" msgpackr-extract "^3.0.2"