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

Alpha #407

Merged
merged 3 commits into from
Mar 17, 2025
Merged

Alpha #407

merged 3 commits into from
Mar 17, 2025

Conversation

jwulf
Copy link
Member

@jwulf jwulf commented Mar 17, 2025

Description of the change

This PR introduces two main changes:

In the integration tests, a fixed delay is added before fetching process variables to ensure they are populated.
In the Camunda job worker, pollLock is explicitly reset when the maximum job capacity is reached.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have opened this pull request against the alpha branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

petar-slavov and others added 3 commits March 14, 2025 12:19
Fix a bug when currentlyActiveJobsCount = maxJobsToActivate, the client stops polling for new jobs.
fix: polling when maxJobsToActivate is reached in REST Worker

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces two main changes:

  • In the integration tests, a fixed delay is added before fetching process variables to ensure they are populated.
  • In the Camunda job worker, pollLock is explicitly reset when the maximum job capacity is reached.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/tests/operate/operate-integration.spec.ts Adds a delay (5000ms) in tests to wait for variables to be populated
src/c8/lib/CamundaJobWorker.ts Resets pollLock when at capacity to maintain proper polling state
Comments suppressed due to low confidence (2)

src/tests/operate/operate-integration.spec.ts:81

  • [nitpick] Consider extracting the hardcoded delay (5000ms) into a named constant (or configurable parameter) to improve readability and maintainability.
await new Promise((res) => setTimeout(res, 5000))

src/c8/lib/CamundaJobWorker.ts:168

  • [nitpick] Consider adding an inline comment to explain why pollLock is reset here, to clarify the intended control flow when capacity is reached.
this.pollLock = false
@jwulf jwulf self-assigned this Mar 17, 2025
@jwulf jwulf merged commit 797a8ba into main Mar 17, 2025
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants