Skip to content

Commit

Permalink
Increase timeout waiting for the exiting of an optimizer worker
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Jan 6, 2023
1 parent 303e3bd commit a23aca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Table Visualization] Refactor table visualization using React and DataGrid component ([#2863](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2863))
- [Vis Builder] Add redux store persistence ([#3088](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3088))
- [Multi DataSource] Improve test connection ([#3110](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3110))
- [Optimizer] Increase timeout waiting for the exiting of an optimizer worker ([#3193](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193))

### 🐛 Bug Fixes

Expand Down
6 changes: 4 additions & 2 deletions packages/osd-optimizer/src/worker/run_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ const exit = (code: number) => {
setTimeout(() => {
send(
workerMsgs.error(
new Error('process did not automatically exit within 5 seconds, forcing exit')
new Error(
`process did not automatically exit within 15 seconds (previous code: ${code}); forcing exit...`
)
)
);
process.exit(1);
}, 5000).unref();
}, 15000).unref();
};

// check for connected parent on an unref'd timer rather than listening
Expand Down

0 comments on commit a23aca8

Please sign in to comment.