Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

CLI option --poll-until-tasks-complete is too slow on many tasks #346

Open

Description

Problem Description

I use cli option --poll-until-tasks-complete too wait until all jobs completed. This option is too slow when you have many tasks (e. g. 80.000). So this option is unusable for me.

Batch Shipyard Version

3.9.1

Activity

  1. alfpark commented on Mar 17, 2020

    @alfpark
    Collaborator

    You can also try the counting API: shipyard jobs tasks counts. Note that this is eventually consistent.

    If that is insufficient, is it possible to add task deletion into your workflow to reduce the count? Otherwise, there will need to be a feature to support OData filtering on that command.

  2. maroony commented on Mar 18, 2020

    @maroony
    Author

    My use case: I have about 170 jobs with each 500 tasks. Together these are 85.000 tasks (total task number).

    Workaround 1: shipyard jobs tasks count:

    Here I have first compute the total task number with the command above. Than I have to write a while loop with this command and compare output line * completed: . Are you seeing a better solution here?

    Workaround 2: Delete tasks when they are completed:

    How could this be easily done? And if this could be done, the first call of poll-until-tasks-complete would be unusable slow as before.

    Workaround 3: Do you have other ideas?

  3. alfpark commented on Apr 6, 2020

    @alfpark
    Collaborator

    Apologies for the delay:

    Workaround 1, that's correct except you should be able to programmatically parse the output with --raw.

    Workaround 2, correct, a filter will need to be implemented.

    For other workarounds, unfortunately you may need to perform a short term integration with Azure CLI and combine some features between the two.

  4. maroony commented on Apr 16, 2020

    @maroony
    Author

    What about the stats command?

    shipyard jobs stats
    

    Could this be fast enough? Does this only output jobs specified in the jobs configuration file or does this command lists all jobs in the batch account? The documentation is not clear to me:

    "stats will generate a statistics summary of a job or jobs"

  5. alfpark commented on Apr 21, 2021

    @alfpark
    Collaborator

    Apologies for the delay. Without a --jobid it will list all jobs in the account. Internally it will call get task counts for each job which is the same as Workaround 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions