Open jfrancis5 opened 1 year ago
Hi @jfrancis5, thanks for creating your first issue in Prefect. I'm curious if you are able to replicate the issue using the concurrency context manager?
Hi @serinamarie I tried using the concurrency context manager as you suggested but I got the following error saying that the module was not found. Do you know which module I would need to install?
Hm, I wasn't able to replicate your issue just using the example from the docs:
from prefect import flow, task
from prefect.concurrency.sync import concurrency
@task
def process_data(x, y):
with concurrency("database", occupy=1):
return x + y
@flow
def my_flow():
for x, y in [(1, 2), (2, 3), (3, 4), (4, 5)]:
process_data.submit(x, y)
if __name__ == "__main__":
my_flow()
Can you share full traceback and an MRE?
hi @jfrancis5 - just bumping this. Is this still an issue for you? if so, could you provide an MRE where you're using the concurrency context manager and a version of prefect new enough to have that module?
First check
Bug summary
The Global Concurrency setting is not being applied to tasks in my flow using the DaskTaskRunner. Here is my configuration for the the global concurrency. I set a global concurrency limit of 2, but this limit is being ignored when running my tasks, and more than 2 tasks are running at the same time
Error screenshot:
Reproduction
Error
Versions
Additional context
No response