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(zeebe): fix activate jobs stream #213

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
## [8.6.8](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.7...v8.6.8) (2024-07-12)


### Bug Fixes

* **admin:** fix members endpoint - fixes [#206](https://github.com/camunda/camunda-8-js-sdk/issues/206) ([#208](https://github.com/camunda/camunda-8-js-sdk/issues/208)) ([19c4c5c](https://github.com/camunda/camunda-8-js-sdk/commit/19c4c5c712c53441eeff108f0517389f9eaf4486)), closes [#207](https://github.com/camunda/camunda-8-js-sdk/issues/207)
* **camunda8:** respect CAMUNDA_OAUTH_STRATEGY ([#209](https://github.com/camunda/camunda-8-js-sdk/issues/209)) ([70c9954](https://github.com/camunda/camunda-8-js-sdk/commit/70c995414ac49f2ee06861c88968b93c2d6a7b95))

## [8.6.7](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.6...v8.6.7) (2024-06-21)


### Bug Fixes

* **docs:** update config for disabling authentication ([df5879f](https://github.com/camunda/camunda-8-js-sdk/commit/df5879ffb8821e2c49e8e71c5a7cedc40e53c869))

## [8.6.6](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.5...v8.6.6) (2024-06-18)


### Bug Fixes

* **optimize:** fix exportReportDefinitions REST call path ([e5f5da7](https://github.com/camunda/camunda-8-js-sdk/commit/e5f5da7bf1e5ab7752fad622d150ec3dfe3e8f47)), closes [#192](https://github.com/camunda/camunda-8-js-sdk/issues/192)

## [8.6.5](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.4...v8.6.5) (2024-06-18)


### Bug Fixes

* **zeebe:** add headers to all REST method calls ([9b99177](https://github.com/camunda/camunda-8-js-sdk/commit/9b991775536ca838d1b278f81126404373389a17))

## [8.6.4](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.3...v8.6.4) (2024-06-13)


### Bug Fixes

* **optimize:** fix labelVariables method ([b8a4c68](https://github.com/camunda/camunda-8-js-sdk/commit/b8a4c68fb42435f0e8c9af22a68cd00dfc0989b1))

## [8.6.3](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.2...v8.6.3) (2024-06-13)


### Bug Fixes

* specify the correct audience when getting an Optimize auth token ([#185](https://github.com/camunda/camunda-8-js-sdk/issues/185)) ([a852281](https://github.com/camunda/camunda-8-js-sdk/commit/a852281c7f5e902f8199282723b2d35efdaaa846))

## [8.6.2](https://github.com/camunda/camunda-8-js-sdk/compare/v8.6.1...v8.6.2) (2024-06-12)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@camunda8/sdk",
"version": "8.6.2",
"version": "8.6.8",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion src/zeebe/zb/ZeebeGrpcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,21 @@ export class ZeebeGrpcClient extends TypedEmitter<
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => {
try {
const jobs: ZB.Job<Variables, CustomHeaders>[] = []

const stream = await (await this.grpc).activateJobsStream(req)
stream.on('data', (res: Grpc.ActivateJobsResponse) => {
const jobs = res.jobs.map((job) =>
const parsedJobs = res.jobs.map((job) =>
parseVariablesAndCustomHeadersToJSON<Variables, CustomHeaders>(
job,
inputVariableDtoToUse,
customHeadersDtoToUse
)
)
jobs.push(...parsedJobs)
})

stream.on('end', () => {
resolve(jobs)
})
} catch (e: unknown) {
Expand Down
Loading