absent-sapphireā¢8mo ago
Why is the "usageTotalUsd" Field Missing Sometimes?
The
usageTotalUsd field of an ActorRun is sometimes defined and sometimes missing. I can't tell the rhyme or reason for when this happens.
For example,
may log "undefined" or may log a number.
What is reason behind the usageTotalUsd field being missing sometimes?
Thank you!5 Replies
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by YBtheS. View answer.
Just a very unlikely guess, but perhaps the run you're checking has not finished yet?
The field is not present for Actors that use PPR or PPE pricing models. This is gonna change in the future but for now the field is returned only for a PPU run, with a breakdown of the usage.
absent-sapphireOPā¢8mo ago
Oh okay, thank you. For those with the same issue using PPR, it seems you can get the total run cost by doing
actorRun.pricingInfo.pricePerUnitUsd multiplied the number of results. I have not tested this though. Iām just guessing.Yeah, you can technically do the same with PPE since you have the breakdown of all the events, it's just way more tedious š