Feature/5895 store all incoming documents in sync db

any reason to  remove the context manager usage here? it is supposed to automatically commit/rollback transactions