Revert "enhance(backend): migrate bull to bullmq (#10910)"

This reverts commit fd7b77c542.
This commit is contained in:
riku6460 2023-06-15 02:57:13 +09:00
parent cc87ef9e76
commit 9b3a92e999
No known key found for this signature in database
GPG key ID: 27414FA27DB94CF6
42 changed files with 509 additions and 542 deletions

View file

@ -1,5 +1,4 @@
import { Inject, Injectable } from '@nestjs/common';
import * as Bull from 'bullmq';
import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, InstancesRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
@ -17,6 +16,7 @@ import { StatusError } from '@/misc/status-error.js';
import { UtilityService } from '@/core/UtilityService.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type Bull from 'bull';
import type { DeliverJobData } from '../types.js';
@Injectable()
@ -121,9 +121,11 @@ export class DeliverProcessorService {
isSuspended: true,
});
});
throw new Bull.UnrecoverableError(`${host} is gone`);
return `${host} is gone`;
}
throw new Bull.UnrecoverableError(`${res.statusCode} ${res.statusMessage}`);
// HTTPステータスコード4xxはクライアントエラーであり、それはつまり
// 何回再送しても成功することはないということなのでエラーにはしないでおく
return `${res.statusCode} ${res.statusMessage}`;
}
// 5xx etc.