Added t.Job.Tasks in api/task/EndSuccessfulTask and api/task/EndFailedTask