improve celery script so celery processes aren't left after it exits