baking-bad / tzkt

😼 Awesome Tezos blockchain indexer and API
https://tzkt.io
MIT License
183 stars 35 forks source link

Allow overriding the number of attempts in TzKt.Api #137

Closed ac10n closed 1 year ago

ac10n commented 1 year ago

In Tzkt.Api/Program.cs We have a hardcoded attempt = 30;.

In Taqueria, we start a Flextesa Sandbox, then a TzKt.Sync, postgres, and finally a TzKt.Api. Some times, the hardcoded 30 attempts is not enough and Api exits before Sync can update the database.

Can we Allow overriding this value from config or environment variables?

Groxan commented 1 year ago

Thank you for the PR! Yes, increasing max attempts would work, but if it's just a matter of running one container after another container, why not to use more appropriate mechanisms, like depends_on+healthcheck?

ac10n commented 1 year ago

@Groxan Thanks for your reply. This is certainly fine in real server deployments, as all infrastructures have a mechanism for that. But for a simpler deployment someone might do on their desktop to check out something, it can be useful if we do not bother them with process/container orchestration complexities?