enhance(backend): improve cache

This commit is contained in:
syuilo
2023-04-05 10:21:10 +09:00
parent 625fed8838
commit f44504097c
32 changed files with 264 additions and 448 deletions

View File

@@ -54,11 +54,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
// Publish event
this.globalEventService.publishInternalEvent('userTokenRegenerated', { id: me.id, oldToken, newToken });
this.globalEventService.publishMainStream(me.id, 'myTokenRegenerated');
// Terminate streaming
setTimeout(() => {
this.globalEventService.publishUserEvent(me.id, 'terminate', {});
}, 5000);
});
}
}

View File

@@ -35,9 +35,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
id: ps.tokenId,
userId: me.id,
});
// Terminate streaming
this.globalEventService.publishUserEvent(me.id, 'terminate');
}
});
}

View File

@@ -284,7 +284,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
// Publish meUpdated event
this.globalEventService.publishMainStream(user.id, 'meUpdated', iObj);
this.globalEventService.publishUserEvent(user.id, 'updateUserProfile', updatedProfile);
// 鍵垢を解除したとき、溜まっていたフォローリクエストがあるならすべて承認
if (user.isLocked && ps.isLocked === false) {