-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/78039 151411 cancel streams on export job abort #8997
Feat/78039 151411 cancel streams on export job abort #8997
Conversation
|
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
apps/app/src/features/page-bulk-export/server/service/page-bulk-export/index.ts
Show resolved
Hide resolved
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…obs' into feat/78039-151411-cancel-streams-on-export-job-abort
…reams-on-export-job-abort
@@ -377,6 +383,8 @@ class PageBulkExportService { | |||
* - abort multipart upload | |||
*/ | |||
async cleanUpExportJobResources(pageBulkExportJob: PageBulkExportJobDocument) { | |||
this.pageBulkExportJobStreamManager?.destroyJobStream(pageBulkExportJob._id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job を cleanUp する際、実行中の stream があればそれを停止させる (実行中の stream が無くてもエラーにはならない
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageBulkExportJobStreamManager?
の ?
不要では?
private jobStreams: Record<string, Readable> = {}; | ||
|
||
addJobStream(jobId: ObjectIdLike, stream: Readable): void { | ||
this.jobStreams[jobId.toString()] = stream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add 時に既に同 ID の stream が存在していたら destroy すべきではないかな
@@ -377,6 +383,8 @@ class PageBulkExportService { | |||
* - abort multipart upload | |||
*/ | |||
async cleanUpExportJobResources(pageBulkExportJob: PageBulkExportJobDocument) { | |||
this.pageBulkExportJobStreamManager?.destroyJobStream(pageBulkExportJob._id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageBulkExportJobStreamManager?
の ?
不要では?
やったこと
task
https://redmine.weseek.co.jp/issues/151411