feat: improve federation chart
This commit is contained in:
@ -8,6 +8,7 @@ export const schema = {
|
||||
'instance.dec': { range: 'small' },
|
||||
'deliveredInstances': { uniqueIncrement: true, range: 'small' },
|
||||
'inboxInstances': { uniqueIncrement: true, range: 'small' },
|
||||
'stalled': { uniqueIncrement: true, range: 'small' },
|
||||
} as const;
|
||||
|
||||
export const entity = Chart.schemaToEntity(name, schema);
|
||||
|
@ -33,9 +33,11 @@ export default class FederationChart extends Chart<typeof schema> {
|
||||
}
|
||||
|
||||
@autobind
|
||||
public async deliverd(host: string): Promise<void> {
|
||||
await this.commit({
|
||||
public async deliverd(host: string, succeeded: boolean): Promise<void> {
|
||||
await this.commit(succeeded ? {
|
||||
'deliveredInstances': [host],
|
||||
} : {
|
||||
'stalled': [host],
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user