Exemple #1
0
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()
Exemple #2
0
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()
Exemple #3
0
 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)
Exemple #4
0
 def cleanup():
     """ delete failed jobs"""
     failed = get_failed_queue(get_connection())
     failed.empty()
Exemple #5
0
 def retry():
     """ retry failed jobs"""
     failed = get_failed_queue(get_connection())
     for job in failed.get_jobs():
         failed.requeue(job.id)