When the Detect() function called the first time, it loads license database from internal files via internal.globalLicenseDatabase(). There are no problems when calling it once from CLI. But it could be an issue when called from HTTP endpoint on a service with limited resource, since the request may be dropped due to connection timeout.
When the
Detect()
function called the first time, it loads license database from internal files viainternal.globalLicenseDatabase()
. There are no problems when calling it once from CLI. But it could be an issue when called from HTTP endpoint on a service with limited resource, since the request may be dropped due to connection timeout.E.g. see this comment: https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3313#note_561680449
I'm proposing to add a new method to load the database before
Detect
, e.g. frommain()
of web-app before starting web-service.