Revert "Merge pull request #86 from MisskeyIO/revert-bullmq"

This reverts commit e8cf53a1ea.

Revert "外部サーバーへの配送が行われない問題を修正 (たぶん) (#98)"

This reverts commit 53931ec59a.

Revert "fix(backend): restore start method in QueueProcessorService (#87)"

This reverts commit e88617e3c3.
This commit is contained in:
riku6460
2023-06-15 11:40:50 +09:00
committed by まっちゃとーにゅ
parent eca41ca472
commit 757eae25bf
41 changed files with 540 additions and 510 deletions

View File

@@ -9,10 +9,10 @@ import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
import { createTemp } from '@/misc/create-temp.js';
import { UtilityService } from '@/core/UtilityService.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type Bull from 'bull';
import type { DbJobDataWithUser } from '../types.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type * as Bull from 'bullmq';
import type { DbJobDataWithUser } from '../types.js';
@Injectable()
export class ExportMutingProcessorService {
@@ -39,12 +39,11 @@ export class ExportMutingProcessorService {
}
@bindThis
public async process(job: Bull.Job<DbJobDataWithUser>, done: () => void): Promise<void> {
public async process(job: Bull.Job<DbJobDataWithUser>): Promise<void> {
this.logger.info(`Exporting muting of ${job.data.user.id} ...`);
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
}
@@ -73,7 +72,7 @@ export class ExportMutingProcessorService {
});
if (mutes.length === 0) {
job.progress(100);
job.updateProgress(100);
break;
}
@@ -103,7 +102,7 @@ export class ExportMutingProcessorService {
muterId: user.id,
});
job.progress(exportedCount / total);
job.updateProgress(exportedCount / total);
}
stream.end();
@@ -116,7 +115,5 @@ export class ExportMutingProcessorService {
} finally {
cleanup();
}
done();
}
}