Add rake tasks to clean up abandoned threads