What does this pull request do? Explain your changes. (required)
Fixes a fatal runtime error when -pricePerUnit is not set, which is allowed with -aiWorker flag in #3047
Specific updates (required)
Checks if basePrice is nil before comparing if it is equal to zero.
I also added a check if transcodePrice is nil before using it, just in case that condition occurs. Though it shouldn't happen because of startup checks that require -pricePerUnit when -aiWorker is not set
How did you test each of these updates (required)
Verified that ai jobs process at the correct price from aiModels.json
Verified -pricePerBroadcaster prices are set correctly for transcoding work
Verified -pricePerUnit price is used for transcode jobs when -pricePerBroadcaster is unset for the broadcasting address
Verified that -autoAdjustPrice still works correctly in all cases
What does this pull request do? Explain your changes. (required)
Fixes a fatal runtime error when
-pricePerUnit
is not set, which is allowed with-aiWorker
flag in #3047Specific updates (required)
-pricePerUnit
when-aiWorker
is not setHow did you test each of these updates (required)
-pricePerBroadcaster
prices are set correctly for transcoding work-pricePerUnit
price is used for transcode jobs when-pricePerBroadcaster
is unset for the broadcasting address-autoAdjustPrice
still works correctly in all casesDoes this pull request close any open issues?
3057
Checklist:
make
runs successfully./test.sh
pass