Skip to content
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: disable activity workers #592

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

cv65kr
Copy link
Contributor

@cv65kr cv65kr commented Dec 15, 2024

Reason for This PR

roadrunner-server/roadrunner#2089

Description of Changes

Disable activity workers

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

@cv65kr
Copy link
Contributor Author

cv65kr commented Dec 15, 2024

@wolfy-j wolfy-j requested a review from rustatian December 15, 2024 20:50
@rustatian
Copy link
Collaborator

Hey @cv65kr 👋🏻 Thank you for the PR 👍🏻

Changes need to be provided to

To skip workers allocation, after the initializing the pool in the config.go, check if that option to disable activity workers is active (set to true) and set NumWorkers to 0: link.

@rustatian rustatian added the C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. label Dec 16, 2024
@rustatian rustatian changed the title feat: Disable activity workers feat: disable activity workers Dec 16, 2024
internal.go Show resolved Hide resolved
@cv65kr
Copy link
Contributor Author

cv65kr commented Dec 16, 2024

@rustatian
Copy link
Collaborator

We can't change the default behavior for the pool.

In the pool (NewPool), last arg are options. You may introduce a new option, like, WithOverrideWorkersNum (something like that) and pass this option in the pool in the rr-temporal plugin. Options are applied after InitDefaults and before actual workers allocation.

@cv65kr cv65kr marked this pull request as ready for review December 16, 2024 20:07
@rustatian rustatian self-requested a review December 16, 2024 21:51
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.71%. Comparing base (c5c2e9a) to head (c2aa12d).
Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
- Coverage   40.06%   36.71%   -3.36%     
==========================================
  Files          14       14              
  Lines         936     1095     +159     
==========================================
+ Hits          375      402      +27     
- Misses        518      652     +134     
+ Partials       43       41       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@rustatian rustatian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @cv65kr 👍🏻

@rustatian rustatian merged commit 6e28ca1 into temporalio:master Dec 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants