List of optimizations running under my token...

Questions refering to the Optiflow based API within PTV Developer (launched on 20.12.2023)
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

List of optimizations running under my token...

Post by Bernd Welter »

Hi there,

I'd like to know what optimization tasks are currently in progress under my token's responsibility.
As far as I knwo there's no "list" method available as of 21.12.2023, right?

My sample application therefore executes a "garbage collection" when the program terminates because after the program exits it will definetly not retrieve the results anymore.

Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
michael.unrau
Posts: 5
Joined: Tue May 16, 2023 11:51 am

Re: List of optimizations running under my token...

Post by michael.unrau »

Yes, at the moment there is no possibility to list running/finished jobs, so you have to keep track of started optimizations yourself.

Cheers,
Michael
Michael Unrau
DevOps Engineer
PTV Logistics - Germany
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: List of optimizations running under my token...

Post by Bernd Welter »

that's at least very important and I look forward to some "administration" methods. Otherwise I probably run into this message

Code: Select all

{
  "ErrorCode": 403,
  "ErrorContent": "{\"description\":\"A product-specific restriction is exceeded.\",\"errorCode\":\"ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED\",\"causes\":[{\"description\":\"The maximum number of concurrent optimizations is exceeded.\",\"errorCode\":\"ROUTEOPTIMIZATION_NUMBER_OF_OPTIMIZATIONS_EXCEEDED\",\"details\":{\"limit\":1}}]}",
  "Headers": {
    "Ratelimit-Remaining": [
      "8"
    ],
  },
  "Message": "Error calling StartOptimization: {\"description\":\"A product-specific restriction is exceeded.\",\"errorCode\":\"ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED\",\"causes\":[{\"description\":\"The maximum number of concurrent optimizations is exceeded.\",\"errorCode\":\"ROUTEOPTIMIZATION_NUMBER_OF_OPTIMIZATIONS_EXCEEDED\",\"details\":{\"limit\":1}}]}",
  "Data": {},
  "InnerException": null,
...  "HelpLink": null,
  "Source": "PTV_Developer",
  "HResult": -2146233088
}
So in my current test client I store the UUID of a planning right after the startOptimization and when I have to terminate the application - for whatever reason - I desperately execute a "stopOptimization" because I won't be able to fetch the result anyway.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: List of optimizations running under my token...

Post by Bernd Welter »

Also check this new feature!
viewtopic.php?p=5417#p5417
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply