]> Some of my projects - localmylist.git/commitdiff
Actually limit retried by failed_count.
authorAPTX <marek321@gmail.com>
Tue, 23 Apr 2013 00:38:42 +0000 (02:38 +0200)
committerAPTX <marek321@gmail.com>
Tue, 23 Apr 2013 00:38:42 +0000 (02:38 +0200)
localmylist/database.cpp

index efa646ae14acd942153038a711805315eb0c6160..74752172888eae8ed2248b4827ae10da868b17f3 100644 (file)
@@ -1026,6 +1026,7 @@ QList<PendingRequest> Database::getRequestBatch(int limit)
        "       WHERE (aid, eid, fid, ed2k, size) IN "
        "               (SELECT aid, eid, fid, ed2k, size FROM pending_request "
        "                       WHERE start IS NULL "
+       "                               AND fail_count <= 3 "
        "                       ORDER BY priority DESC, added ASC "
        "                       LIMIT :limit) "
        "       RETURNING aid, eid, fid, ed2k, size ");
@@ -1146,6 +1147,7 @@ QList<PendingMyListUpdate> Database::getPendingMyListUpdateBatch(int limit)
        "       WHERE update_id IN "
        "               (SELECT update_id FROM pending_mylist_update "
        "                       WHERE started IS NULL "
+       "                               AND fail_count <= 3 "
        "                       ORDER BY added ASC "
        "                       LIMIT :limit) "
        "       RETURNING update_id, fid, aid, epno, epmin, eptype, set_my_watched, my_watched, set_my_state, "