# Need for clarification and help regarding kickoff\_async\_foreach

**URL:** <https://community.crewai.com/t/need-for-clarification-and-help-regarding-kickoff-async-foreach/1320>\
**Category:** CrewAI Community Support\
**Tags:** crewai\
**Created:** [November 10, 2024, 3:12pm UTC](https://community.crewai.com/t/need-for-clarification-and-help-regarding-kickoff-async-foreach/1320 "2024-11-10T15:12:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paarttipaabhalaji](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/paarttipaabhalaji/32/2053_2.png) [@Paarttipaabhalaji](https://community.crewai.com/u/Paarttipaabhalaji)\
**Post date:** [November 10, 2024, 3:12pm UTC](https://community.crewai.com/t/need-for-clarification-and-help-regarding-kickoff-async-foreach/1320/1 "2024-11-10T15:12:00Z")

</div>

Hi. Did you have any examples of executing the crew in kickoff\_async\_foreach / kickoff\_async? please help me on this. I have tried, but the process running in background. Even though I waited for long time. I didn’t see any results.

here is the crew

@crew  
def crew(self) → Crew:  
“”“Creates the Bklog10Crew crew”“”  
print(“crew”)  
return Crew(  
agents=self.agents, # Automatically created by the @agent decorator  
tasks=self.tasks, # Automatically created by the @task decorator  
process=Process.sequential,  
verbose=True

# process=Process.hierarchical, # In case you wanna use that instead [Introduction - CrewAI](https://docs.crewai.com/how-to/Hierarchical/)

)

run method:

def run():  
“”"  
Run the crew.  
“”"

# inputs = {

# ‘FilePath’: ‘/Users/paarttipaa/ProjectTask/GithubProj/BCK\_Log\_SLC\_Code\_Explanation\_Project/work/10/bklog10crew/dataset/PageData01\_112.java’

# }

JavaFilePath=process\_directory(dirpath=os.getenv(“INPUT\_DIRECTORY\_PATH”))  
print(JavaFilePath)  
Bklog10CrewCrew().crew().kickoff\_for\_each\_async(inputs=JavaFilePath,)

# print(Bklog10CrewCrew().crew().usage\_metrics)

console output:  
(.agentCrewaiLatestVersions) paarttipaa@Paarttipaabhalajis-MacBook-Pro bklog10crew % crewai run  
Running the Crew  
warning: `VIRTUAL_ENV=/Users/paarttipaa/ProjectTask/GithubProj/BCK_Log_SLC_Code_Explanation_Project/.agentCrewaiLatestVersions` does not match the project environment path `.venv` and will be ignored  
[{‘FilePath’: ‘/Users/paarttipaa/ProjectTask/GithubProj/BCK\_Log\_SLC\_Code\_Explanation\_Project/work/10/bklog10crew/dataset/PageData01\_112.java’}]  
fileRetriverAgent  
methodAnalyzerAgent  
methodsClassifierTask  
conditionalMatrixAnalystAgent  
conditionalMatrixGenTask  
reportingSpecialistAgent  
retriveFileTask  
reportingSpecialistTasks  
crew  
/Users/paarttipaa/ProjectTask/GithubProj/BCK\_Log\_SLC\_Code\_Explanation\_Project/work/10/bklog10crew/src/bklog10crew/main.py:39: RuntimeWarning: coroutine ‘Crew.kickoff\_for\_each\_async’ was never awaited  
Bklog10CrewCrew().crew().kickoff\_for\_each\_async(inputs=JavaFilePath)  
RuntimeWarning: Enable tracemalloc to get the object allocation traceback  
(.agentCrewaiLatestVersions) paarttipaa@Paarttipaabhalajis-MacBook-Pro bklog10crew %

​
