✌️
This commit is contained in:
@@ -83,10 +83,15 @@ export class DeliverProcessorService {
|
||||
await this.apRequestService.signedPost(job.data.user, job.data.to, job.data.content);
|
||||
|
||||
// Update stats
|
||||
this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => {
|
||||
this.instancesRepository.update(i.id, {
|
||||
isNotResponding: false,
|
||||
});
|
||||
this.federatedInstanceService.fetch(host).then(i => {
|
||||
if (i.isNotResponding) {
|
||||
this.instancesRepository.update(i.id, {
|
||||
isNotResponding: false,
|
||||
});
|
||||
this.federatedInstanceService.updateCachePartial(host, {
|
||||
isNotResponding: false,
|
||||
});
|
||||
}
|
||||
|
||||
this.fetchInstanceMetadataService.fetchInstanceMetadata(i);
|
||||
|
||||
@@ -98,10 +103,15 @@ export class DeliverProcessorService {
|
||||
return 'Success';
|
||||
} catch (res) {
|
||||
// Update stats
|
||||
this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => {
|
||||
this.instancesRepository.update(i.id, {
|
||||
isNotResponding: true,
|
||||
});
|
||||
this.federatedInstanceService.fetch(host).then(i => {
|
||||
if (!i.isNotResponding) {
|
||||
this.instancesRepository.update(i.id, {
|
||||
isNotResponding: true,
|
||||
});
|
||||
this.federatedInstanceService.updateCachePartial(host, {
|
||||
isNotResponding: true,
|
||||
});
|
||||
}
|
||||
|
||||
this.instanceChart.requestSent(i.host, false);
|
||||
this.apRequestChart.deliverFail();
|
||||
|
@@ -176,11 +176,14 @@ export class InboxProcessorService {
|
||||
}
|
||||
|
||||
// Update stats
|
||||
this.federatedInstanceService.registerOrFetchInstanceDoc(authUser.user.host).then(i => {
|
||||
this.federatedInstanceService.fetch(authUser.user.host).then(i => {
|
||||
this.instancesRepository.update(i.id, {
|
||||
latestRequestReceivedAt: new Date(),
|
||||
isNotResponding: false,
|
||||
});
|
||||
this.federatedInstanceService.updateCachePartial(host, {
|
||||
isNotResponding: false,
|
||||
});
|
||||
|
||||
this.fetchInstanceMetadataService.fetchInstanceMetadata(i);
|
||||
|
||||
|
Reference in New Issue
Block a user