mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 22:39:33 +09:00
logger
This commit is contained in:
parent
31bf1dbc95
commit
4b9ffb8dc0
@ -14,6 +14,7 @@ import type { IActivity } from '@/core/activitypub/type.js';
|
|||||||
import { ThinUser } from '@/queue/types.js';
|
import { ThinUser } from '@/queue/types.js';
|
||||||
import { AccountUpdateService } from '@/core/AccountUpdateService.js';
|
import { AccountUpdateService } from '@/core/AccountUpdateService.js';
|
||||||
import { UserKeypairService } from '../UserKeypairService.js';
|
import { UserKeypairService } from '../UserKeypairService.js';
|
||||||
|
import Logger from '@/logger.js';
|
||||||
|
|
||||||
interface IRecipe {
|
interface IRecipe {
|
||||||
type: string;
|
type: string;
|
||||||
@ -23,6 +24,8 @@ interface IFollowersRecipe extends IRecipe {
|
|||||||
type: 'Followers';
|
type: 'Followers';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logger = new Logger('deliver-manager', 'azure');
|
||||||
|
|
||||||
interface IDirectRecipe extends IRecipe {
|
interface IDirectRecipe extends IRecipe {
|
||||||
type: 'Direct';
|
type: 'Direct';
|
||||||
to: MiRemoteUser;
|
to: MiRemoteUser;
|
||||||
@ -114,6 +117,7 @@ class DeliverManager {
|
|||||||
*/
|
*/
|
||||||
const created = await this.userKeypairService.refreshAndprepareEd25519KeyPair(this.actor.id);
|
const created = await this.userKeypairService.refreshAndprepareEd25519KeyPair(this.actor.id);
|
||||||
if (created) {
|
if (created) {
|
||||||
|
logger.info(`ed25519 key pair created for user ${this.actor.id} and publishing to followers`);
|
||||||
// リモートに配信
|
// リモートに配信
|
||||||
await this.accountUpdateService.publishToFollowers(this.actor.id, true);
|
await this.accountUpdateService.publishToFollowers(this.actor.id, true);
|
||||||
}
|
}
|
||||||
@ -160,6 +164,7 @@ class DeliverManager {
|
|||||||
|
|
||||||
// deliver
|
// deliver
|
||||||
await this.queueService.deliverMany(this.actor, this.activity, inboxes);
|
await this.queueService.deliverMany(this.actor, this.activity, inboxes);
|
||||||
|
logger.info(`Deliver queues dispatched to ${inboxes.size} inboxes`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user