cleanup: trim trailing whitespace (#11136)
* cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -283,7 +283,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||
});
|
||||
|
||||
const relationshipLogger = this.logger.createSubLogger('relationship');
|
||||
|
||||
|
||||
this.relationshipQueueWorker
|
||||
.on('active', (job) => relationshipLogger.debug(`active id=${job.id}`))
|
||||
.on('completed', (job, result) => relationshipLogger.debug(`completed(${result}) id=${job.id}`))
|
||||
|
@@ -30,7 +30,7 @@ export class ExportAntennasProcessorService {
|
||||
|
||||
@Inject(DI.userListJoiningsRepository)
|
||||
private userListJoiningsRepository: UserListJoiningsRepository,
|
||||
|
||||
|
||||
private driveService: DriveService,
|
||||
private utilityService: UtilityService,
|
||||
private queueLoggerService: QueueLoggerService,
|
||||
|
@@ -17,11 +17,11 @@ const validate = new Ajv().compile({
|
||||
properties: {
|
||||
name: { type: 'string', minLength: 1, maxLength: 100 },
|
||||
src: { type: 'string', enum: ['home', 'all', 'users', 'list'] },
|
||||
userListAccts: {
|
||||
type: 'array',
|
||||
userListAccts: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
nullable: true,
|
||||
},
|
||||
keywords: { type: 'array', items: {
|
||||
|
@@ -113,7 +113,7 @@ export class ImportCustomEmojisProcessorService {
|
||||
}
|
||||
|
||||
cleanup();
|
||||
|
||||
|
||||
this.logger.succ('Imported');
|
||||
});
|
||||
unzipStream.pipe(extractor);
|
||||
|
@@ -31,7 +31,7 @@ export class WebhookDeliverProcessorService {
|
||||
public async process(job: Bull.Job<WebhookDeliverJobData>): Promise<string> {
|
||||
try {
|
||||
this.logger.debug(`delivering ${job.data.webhookId}`);
|
||||
|
||||
|
||||
const res = await this.httpRequestService.send(job.data.to, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -50,25 +50,25 @@ export class WebhookDeliverProcessorService {
|
||||
body: job.data.content,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
this.webhooksRepository.update({ id: job.data.webhookId }, {
|
||||
latestSentAt: new Date(),
|
||||
latestStatus: res.status,
|
||||
});
|
||||
|
||||
|
||||
return 'Success';
|
||||
} catch (res) {
|
||||
this.webhooksRepository.update({ id: job.data.webhookId }, {
|
||||
latestSentAt: new Date(),
|
||||
latestStatus: res instanceof StatusError ? res.statusCode : 1,
|
||||
});
|
||||
|
||||
|
||||
if (res instanceof StatusError) {
|
||||
// 4xx
|
||||
if (res.isClientError) {
|
||||
throw new Bull.UnrecoverableError(`${res.statusCode} ${res.statusMessage}`);
|
||||
}
|
||||
|
||||
|
||||
// 5xx etc.
|
||||
throw new Error(`${res.statusCode} ${res.statusMessage}`);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user