Connecting with API is taking longer when lots of jobs in queu

Viewing 6 posts - 1 through 6 (of 6 total)
  • 15th August 2019 at 12:20 pm #20431

    We have a system that automatically submits jobs to muster with the API. We use the python script.

    We noticed that it takes longer to communicate when we have a lot of jobs in the queu. I assume it is the same when you login on the console, it has to read all the jobs and logs.
    As we have a lot of jobs (thousands) it is taking longer and longer to submit them.

    Now each job is submitted separate to muster, so each time it has to read all the jobs and logs.
    I there a way to let it stay connected instead of retrieving the complete job list each time?

    15th August 2019 at 1:47 pm #20436

    Could you post your connection script ? By default when you connect with the APIs jobs are not downloaded ….

    16th August 2019 at 3:50 pm #20491

    How can i post my code? When i paste it here i get a forbidden page.

    16th August 2019 at 7:19 pm #20498

    You need to press the “CODE” button at the top of the text field to put the answer, like:

    import MClientAPI

    17th August 2019 at 8:05 pm #20548

    It still gives me this message: A potentially unsafe operation has been detected in your request to this site.

    I put the script online on this address: http://i2.nl/temp/connection_script.txt
    Hope you can read it there.

    Thank you.

    18th August 2019 at 10:04 am #20577

    you are calling your function CheckNameFolder that in turns downloads all the jobs, that’s why your script is slow. You may consider a different way to submit the job without checking if that folder exists, maybe doing the check in a separate script that you launch just once.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.