79672618

Date: 2025-06-19 20:54:20
Score: 7.5 🚩
Natty:
Report link

thank you @mkrieger1 and @Charles Duffy for your comments! will look into it.

Regarding the subprocess task I am totally aligned with the need to "convert" it to something async (your links will help).

Actually, my question is more related on how to orchestrate the following use-case with regards to file_parts inputs (see first message) (sorry I wasn't clear enough):

  1. Download file_1 parts

  2. Then, Download file_2 parts AND (simultaneously) Extract file_1 parts

  3. Then Extract file_2 parts

What I have in mind is that the step(s) in the middle can be achieved with a TaskGroup

async with asyncio.TaskGroup() as tg:
    task1 = tg.create_task(self.downlad(["file_2.7z.001", "file_2.7z.002"]))
    task2 = tg.create_task(self.extract(["file_1.7z.001", "file_1.7z.002"]))

But as for the first (download only) and last part (extract only) how to achieve such orchestration?

Thank you!

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): regards
  • Blacklisted phrase (1): how to achieve
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • User mentioned (1): @mkrieger1
  • User mentioned (0): @Charles
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: aymericpineau