Prefer session.remove instead of session.close
Remove unused imports
Store a key in redis when requesting newtask, and require it when posting taskrun to that task