Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix: 本番環境 - Heroku でビルド・実行できない問題
Browse files Browse the repository at this point in the history
  • Loading branch information
mugiply committed Mar 8, 2021
1 parent ba22a7c commit 25da3bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/server/src/openapi-doc-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ async function bootstrap(): Promise<void> {
useValue: {},
});

mockedProviders.push({
provide: 'BullQueue_crawler',
useValue: {},
});

// アプリケーションのインスタンスを生成
const testingModule = await Test.createTestingModule({
controllers: controllers,
Expand Down
6 changes: 3 additions & 3 deletions packages/server/src/topics/topics.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { TweetFilterService } from './ml/tweet-filter.service';
// 自動クリーンアップ - 完了またはエラーにより終了したジョブを残す数
// (この数を超えた古いジョブは削除される)
const AUTO_CLEANUP_NUM_OF_FINISHED_QUEUE_JOBS_LEFT = 2;
const AUTO_CLEANUP_NUM_OF_FINISHED_TRAINER_QUEUE_JOBS_LEFT = 2;
const AUTO_CLEANUP_NUM_OF_FINISHED_TRAINER_QUEUE_JOBS_LEFT = 1;

/**
* トピックに関する WebAPI を構築するためのモジュール
Expand Down Expand Up @@ -68,8 +68,8 @@ const AUTO_CLEANUP_NUM_OF_FINISHED_TRAINER_QUEUE_JOBS_LEFT = 2;
BullModule.registerQueue({
name: 'retrainer',
defaultJobOptions: {
removeOnComplete: AUTO_CLEANUP_NUM_OF_FINISHED_TRAINER_QUEUE_JOBS_LEFT,
removeOnFail: AUTO_CLEANUP_NUM_OF_FINISHED_TRAINER_QUEUE_JOBS_LEFT,
removeOnComplete: AUTO_CLEANUP_NUM_OF_FINISHED_QUEUE_JOBS_LEFT,
removeOnFail: AUTO_CLEANUP_NUM_OF_FINISHED_QUEUE_JOBS_LEFT,
},
}),
],
Expand Down

0 comments on commit 25da3bb

Please sign in to comment.