codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
Other
605 stars 141 forks source link

Server is crashing when exceeding errlog.io quota #10

Closed elad-bar closed 1 year ago

elad-bar commented 1 year ago

Issue: Errlog.io has a freeimum account that being used by the application, however, when excceding that quota (of 5k requests per day), it returns an error which causes messages to stay in queue and crash down the service.

When the environment variable CPAI_ERRLOG_APIKEY is empty, there is an exception as the apiKey is invalid, which triggers an exception with the same result.

Use case: I have NVR solution (Shinobi Video) that uses the API (originally wrote it for DeepStack) for any motion detected on specific set of camera, since there are many events during the day of resulted by wind / cats and other events without face, server consider them as errors and tries to report the errlog.io.

PR #9 solves that issue

ChrisMaunder commented 1 year ago

Fixed