n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
49.51k stars 7.98k forks source link

feat(core): Shut down runner on idle timeout (no-changelog) #11820

Closed ivov closed 3 days ago

ivov commented 4 days ago

Summary

Exit the runner if idle for longer than N8N_RUNNERS_IDLE_TIMEOUT seconds in external mode. Launcher will later re-launch runner on demand.

To be reviewed together with: https://github.com/n8n-io/task-runner-launcher/pull/13

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-2246

Review / Merge checklist

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review. Files with missing lines Patch % Lines
packages/cli/src/runners/task-broker.service.ts 0.00% 1 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!

tomi commented 4 days ago

Also, remember to add the new env var here

Edit: Looks like it's covered already in the launcher

github-actions[bot] commented 3 days ago

:white_check_mark: All Cypress E2E specs passed

cypress[bot] commented 3 days ago

n8n    Run #8043

Run Properties:  status check passed Passed #8043  •  git commit ca7baecffc: ๐ŸŒณ ๐Ÿ–ฅ๏ธ browsers:node18.12.0-chrome107 ๐Ÿค– ivov ๐Ÿ—ƒ๏ธ e2e/*
Project n8n
Branch Review runner-idle-timeout
Run status status check passed Passed #8043
Run duration 04m 39s
Commit git commit ca7baecffc: ๐ŸŒณ ๐Ÿ–ฅ๏ธ browsers:node18.12.0-chrome107 ๐Ÿค– ivov ๐Ÿ—ƒ๏ธ e2e/*
Committer Ivรกn Ovejero
View all properties for this run โ†—๏ธŽ

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 478
View all changes introduced in this branch โ†—๏ธŽ