fix(datalayer): make datalayer usable outside request context

hi - here is a fix when using datalayer outside request context but with app one
we use datalayer within a celery tasks where there is no request context, i think this should work right?