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

[BUG]the start points are not executed in parallel #1949

Open
qkxie opened this issue Jan 22, 2025 · 0 comments
Open

[BUG]the start points are not executed in parallel #1949

qkxie opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@qkxie
Copy link

qkxie commented Jan 22, 2025

Description

Image

In the document, you said that a flow could have multiple start methods and they will run parallelly

However, when I test this feature, I have found that two start methods are just run one after another, not parallelly.

Steps to Reproduce

Just run the following code:

from crewai.flow.flow import Flow, listen, start
import time
import string


class StructuredExampleFlow(Flow):

    @start()
    def first_method(self):
        for i in range(10):
            print(i)
            time.sleep(1)
        return "first done"

    @start()
    def second_method(self):
        for x in string.ascii_lowercase:
            print(x)
            time.sleep(1)
        return "second done"

    @listen(first_method)
    def first_method_listener(self, status):
        print(status)

    @listen(second_method)
    def second_method_listener(self, status):
        print(status)



flow = StructuredExampleFlow()
flow.kickoff()

Expected behavior

Numbers and letters should be printed alternately.

Screenshots/Code snippets

Image

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

0.95.0

crewAI Tools Version

0.25.8

Virtual Environment

Venv

Evidence

Image

Possible Solution

None

Additional context

None

@qkxie qkxie added the bug Something isn't working label Jan 22, 2025
@qkxie qkxie changed the title [BUG]the start point are not executed in parallel [BUG]the start points are not executed in parallel Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant