pyzeebe icon indicating copy to clipboard operation
pyzeebe copied to clipboard

Support tenant ids

Open barziv opened this issue 11 months ago • 1 comments

Hey, I saw multiTenancy option in Zeebe and I don't see this option here, How can I use tenants with pyzeebe?

Zeebe docs - multi tenancy

This is how node-zeebe implement this -

const activateJobsRequest: ActivateJobsRequest = {
			maxJobsToActivate: amount,
			requestTimeout,
			timeout: this.timeout,
			type: this.taskType,
			worker: this.id,
			fetchVariable: this.fetchVariable as string[],
			tenantIds: this.tenantId ? [this.tenantId] : undefined
		}

		this.logger.logDebug(
			`Requesting ${amount} jobs on [${id}] with requestTimeout ${Duration.value.of(
				requestTimeout
			)}, job timeout: ${Duration.value.of(this.timeout)}`
		)
		debug(
			`Requesting ${amount} jobs on [${id}] with requestTimeout ${Duration.value.of(
				requestTimeout
			)}, job timeout: ${Duration.value.of(this.timeout)}`
		)

		try {
			stream = await this.grpcClient.activateJobsStream(
				activateJobsRequest
			)

So I thought maybe we need to add tanantIds to pyzeebe/grpc_internals/zeebe_job_adapter.py on ActivateJobsRequest line

barziv avatar Mar 17 '24 10:03 barziv