remove check-hibernation task, as it's been obsoleted by HibernateUsersProcessorService
This commit is contained in:
parent
152714ca03
commit
be517b5fdc
3 changed files with 0 additions and 21 deletions
|
|
@ -877,16 +877,6 @@ export class QueueService implements OnModuleInit {
|
|||
return await this.createBackgroundTask({ type: 'post-note', noteId, silent, edit }, duplication);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async createCheckHibernationJob(userId: string) {
|
||||
return await this.createBackgroundTask(
|
||||
{ type: 'check-hibernation', userId },
|
||||
|
||||
// This is a very heavy task, so only run once per day per user
|
||||
{ id: `check-hibernation:${userId}`, ttl: 1000 * 60 * 60 * 24 },
|
||||
);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async createUpdateUserTagsJob(userId: string) {
|
||||
return await this.createBackgroundTask({ type: 'update-user-tags', userId }, userId);
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ export class BackgroundTaskProcessorService {
|
|||
return await this.processPostInbox(job.data);
|
||||
} else if (job.data.type === 'post-note') {
|
||||
return await this.processPostNote(job.data);
|
||||
} else if (job.data.type === 'check-hibernation') {
|
||||
return await this.processCheckHibernation(job.data);
|
||||
} else if (job.data.type === 'delete-file') {
|
||||
return await this.processDeleteFile(job.data);
|
||||
} else if (job.data.type === 'update-latest-note') {
|
||||
|
|
@ -272,14 +270,6 @@ export class BackgroundTaskProcessorService {
|
|||
return 'ok';
|
||||
}
|
||||
|
||||
private async processCheckHibernation(task: CheckHibernationBackgroundTask): Promise<string> {
|
||||
const followers = await this.cacheService.getNonHibernatedFollowers(task.userId);
|
||||
if (followers.length < 1) return `Skipping check-hibernation task: user ${task.userId} has no non-hibernated followers`;
|
||||
|
||||
await this.noteCreateService.checkHibernation(followers);
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
private async processDeleteFile(task: DeleteFileBackgroundTask): Promise<string> {
|
||||
const file = await this.driveFilesRepository.findOneBy({ id: task.fileId });
|
||||
if (!file) return `Skipping delete-file task: file ${task.fileId} has been deleted`;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ export type BackgroundTaskJobData =
|
|||
PostDeliverBackgroundTask |
|
||||
PostInboxBackgroundTask |
|
||||
PostNoteBackgroundTask |
|
||||
CheckHibernationBackgroundTask |
|
||||
DeleteFileBackgroundTask |
|
||||
UpdateLatestNoteBackgroundTask |
|
||||
PostSuspendBackgroundTask |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue