fix syntax issue when running
the add_timeout interface is only available after tornado 4.0
several fixes
fix issue when running celery