swanchain / go-computing-provider

A golang implementation of computing provider
MIT License
11 stars 15 forks source link

fix(cron_task): Check the case where the get Collateral balance API returns an unsuccessful status #82

Closed yejiayu closed 1 month ago

yejiayu commented 1 month ago

The cron task periodically checks the collateral balance through the orchestrator-api. However, I often find that the program outputs the log message ‘No sufficient collateral Balance, the current collateral balance is: 0.000.

I suspect that the status in the orchestrator-api response {"data":{"balance":2000000000000},"message":"Successfully retrieved collateral balance","status":"success"} is not always status: success, which causes the default balance value to be 0. This might be the reason for the issue.

Normalnoise commented 1 month ago

thanks for your contributions