Job ID from historyList and listJobs is different

Hi,

I don't know if this is either a bug or intended behavior but when I use historyList and get the job ID after the job is printed, the ID that I get is different from the job ID I got from listJobs when the job was still in queue. I am using one of the nightly builds from 1.4.3 so I am wondering if this is just a bug in my version? If not is there some kind of metadata I can grab from a job while it is in queue that I can then later use for my code to check to see if it printed properly? The name wont work since sometimes the file name is not unique.

Thanks
Mark

Comments

  • Job ids while printing are temporary and not used anywhere afterwards. It is just to identify a file in job queue. If you restart server with empty jobs the next id will again be 1 so they can get reused quickly.

    Not sure which id you mean but historyList comes from a database and every entry there has a id as well, so I think you mean the database id of the entry.

    If you need a automatic solution to find it you should use start or end date in your data in combination with the file name. E.g. add in start a api call to you system using job.name and config.slug to identify on which printer which name was started. There is no start date time but adding it in the printer start script makes it get called at start so you can just use current time and always use closest time with given name/slug.
  • Thanks for the explanation. I will set my program to give unique tag at the end of my file name then.

    Cheers
    Mark
Sign In or Register to comment.