def socketio(remaining): real_request = request._get_current_object() # add redis connection real_request._conn = get_connection() real_request._data_root = current_app.config.get("DATA_ROOT") real_request._signer = itsdangerous.Signer(current_app.secret_key) socketio_manage(request.environ, {"/status": StatusNamespace, "/build": BuildNamespace}, request=real_request) return Response()
def socketio(remaining): real_request = request._get_current_object() # add redis connection real_request._conn = get_connection() real_request._data_root = current_app.config.get('DATA_ROOT') real_request._signer = itsdangerous.Signer(current_app.secret_key) socketio_manage(request.environ, { '/status': StatusNamespace, '/build': BuildNamespace, }, request=real_request) return Response()
def requeue_failed(): from rq import get_failed_queue from flask.ext.rq import get_connection failed = get_failed_queue(get_connection()) for job in failed.get_jobs(): failed.requeue(job.id)
def cleanup(): """ delete failed jobs""" failed = get_failed_queue(get_connection()) failed.empty()
def retry(): """ retry failed jobs""" failed = get_failed_queue(get_connection()) for job in failed.get_jobs(): failed.requeue(job.id)