create scoped session in the task