Skip to main content
This rule prevents setting maxConcurrency values that exceed Gadget’s hard limit of 100 in api.enqueue calls. Gadget will reject enqueue calls with maxConcurrency above 100 at runtime.

Rule Details

This rule checks api.enqueue calls for the queue.maxConcurrency option and reports an error if the value exceeds 100. Severity: Error Auto-fixable: No

Examples

Incorrect

Correct

This rule applies to all files, not just action files, since api.enqueue can be called from anywhere in your codebase.

Why This Matters

Gadget enforces a hard limit of 100 concurrent jobs per queue. Setting maxConcurrency above this limit will cause Gadget to reject the enqueue call at runtime with an error.
Gadget will reject enqueue calls with maxConcurrency above 100. This rule catches the problem at development time before it causes runtime failures.

When to Use

This rule is included in the recommended config and should always be enabled for Gadget projects. It prevents runtime errors by validating queue configuration at development time.