brighthive/data-resource-api

Error on startup

loganripplinger opened this issue · 4 comments

On startup the data resource manager will print out a series of errors.

Additionally the thread will continue to execute and the sleep thread call will not work until later.

The first issue is occurring because the data resource manager has two threads; the parent process and a threaded process. The threaded process attempts to run immediately before the parent process can create the flask application. Thus the threaded process attempts to reference the flask application but it does not yet exist.

This can be fixed by checking if the flask variables are null.

The sleep issue is pretty strange. Upon looking at it, it appears to be successfully calling sleep with 60 seconds but for some reason is not actually triggering until it attempts a few times.

The timer issue is still unresolved but low priority. It currently does not affect anything and will only skip a few sleep calls.

The timer issue is actually gunicorn running four threads and thus is not actually an issue.