Forum

Author Topic: Defining batch_id  (Read 1300 times)

Enginuic

  • Newbie
  • *
  • Posts: 2
    • View Profile
Defining batch_id
« on: May 28, 2021, 07:26:29 PM »
When i create a batch using python and push it to a network server, is there a way that I can define what number that batch will have in the server? by default the numbers are incremental, but I notice I can define the number arbitrarily in a batch json file, so I thought maybe it could be done programmatically via the API.

My reason for this, is I am writing an app that is monitoring the output from the server console window and would like to be able to explicitly define which number applies to which batch from an external predefined list accessible to multiple applications rather than having to add the job, read back the ID, then synchronize it to the other apps.

I notice client.createBatch(<path>, <tasks>, <metadata>) has a third parameter of metadata which appears to be optional, is it possible to define a batch_id number here? if so how? Thanks!