Skip to content

Commit

Permalink
lint: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed May 23, 2024
1 parent 830b3c6 commit 79fa5cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class InstanceEntityService {
followingCount: instance.followingCount,
followersCount: instance.followersCount,
isNotResponding: instance.isNotResponding,
isSuspended: instance.suspendedState != 'none',
isSuspended: instance.suspendedState !== 'none',
suspendedState: instance.suspendedState,
isBlocked: this.utilityService.isBlockedHost(meta.blockedHosts, instance.host),
softwareName: instance.softwareName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { Inject, Injectable } from '@nestjs/common';
import * as Bull from 'bullmq';
import { Not } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { InstancesRepository } from '@/models/_.js';
import type Logger from '@/logger.js';
Expand All @@ -22,7 +23,6 @@ import { UtilityService } from '@/core/UtilityService.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type { DeliverJobData } from '../types.js';
import {Not} from "typeorm";

@Injectable()
export class DeliverProcessorService {
Expand Down Expand Up @@ -63,7 +63,7 @@ export class DeliverProcessorService {
if (suspendedHosts == null) {
suspendedHosts = await this.instancesRepository.find({
where: {
suspendedState: Not("none"),
suspendedState: Not('none'),
},
});
this.suspendedHostsCache.set(suspendedHosts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class InboxProcessorService {
latestRequestReceivedAt: new Date(),
isNotResponding: false,
// もしサーバーが死んでるために配信が止まっていた場合には自動的に復活させてあげる
suspendedState: i.suspendedState == 'autoSuspendedForNotResponding' ? 'none' : undefined,
suspendedState: i.suspendedState === 'autoSuspendedForNotResponding' ? 'none' : undefined,
});

this.fetchInstanceMetadataService.fetchInstanceMetadata(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new Error('instance not found');
}

let isSuspendedBefore = instance.suspendedState !== 'none';
const isSuspendedBefore = instance.suspendedState !== 'none';
let suspendedState: undefined | 'manuallySuspended' | 'none';

if (ps.isSuspended != null && isSuspendedBefore !== ps.isSuspended) {
Expand Down

0 comments on commit 79fa5cd

Please sign in to comment.