Skip to content

Incorrect documentation for function concurrency  #880

@antonio-bluco

Description

@antonio-bluco

Hi,

This page has wrong documentation around function concurrency.

Verbatim:

This limits all accounts to a single execution for this function, based off of the event.data.account_id field.

Similarly in the parallel import example below, the following explanation is given:

Inngest ensures that the concurrency (1) applies to each unique value for event.data.customerId. This allows different customers to have functions running at the same exact time, but no given customer can have two functions running at once!

To my understanding, these statements are both wrong. What the concurrency parameter controls is parallel execution of steps, not of functions. So if your function consists of a single step, this works - but if you function has 3 steps, then both functions can run at the same time (just one step at a time).

This is problematic if you need the second invocation to wait for the first invocation to fully finish before starting (due to some db state which needs to be in a certain way, for example) - and IMO the docs are very confusing on this point.

Btw, is there a way to achieve function-level concurrency control, instead of steps-level?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions