Esempio n. 1
0
def run_ranked_match(match):
    db = dbcon.connect_fresh_db()
    ret = 0
    if match:
        rungame.run_match(db, match)
        ret = 1
    db.ctx.db.close()
    return ret
Esempio n. 2
0
def run_ranked_match(match):
    db = dbcon.connect_fresh_db()
    ret = 0
    if match:
        rungame.run_match(db, match)
        ret = 1
    db.ctx.db.close()
    return ret
Esempio n. 3
0
def run_unranked_match(db, lock):
    match = sync_get_match(db, lock)
    ret = 0
    if match:
        r1_rating = match.r1_rating or tools.DEFAULT_RATING
        r2_rating = match.r2_rating or tools.DEFAULT_RATING
        print('unranked {0:5}({1:.5g}) v {2:5}({3:.5g}) : m {4} s {5}'.format(
            match.r1_id, r1_rating, match.r2_id, r2_rating,
            match.id, match.seed))
        rungame.run_match(db, match)
        ret = 1
    return ret
Esempio n. 4
0
def run_unranked_match(db, lock):
    match = sync_get_match(db, lock)
    ret = 0
    if match:
        r1_rating = match.r1_rating or tools.DEFAULT_RATING
        r2_rating = match.r2_rating or tools.DEFAULT_RATING
        print('unranked {0:5}({1:.5g}) v {2:5}({3:.5g}) : m {4} s {5}'.format(
            match.r1_id, r1_rating, match.r2_id, r2_rating,
            match.id, match.seed))
        rungame.run_match(db, match)
        ret = 1
    return ret
Esempio n. 5
0
def run_unranked_match(lock):
    db = dbcon.connect_fresh_db()
    match = sync_get_match(db, lock)
    ret = 0
    if match:
        r1_rating = match.r1_rating or tools.DEFAULT_RATING
        r2_rating = match.r2_rating or tools.DEFAULT_RATING
        print('unranked {0:5}({1:.5g}) v {2:5}({3:.5g}) : m {4} s {5}'.format(
            match.r1_id, r1_rating, match.r2_id, r2_rating, match.id,
            match.seed))
        rungame.run_match(db, match)
        ret = 1
    db.ctx.db.close()
    return ret
Esempio n. 6
0
def run_unranked_match(lock):
    db = dbcon.connect_fresh_db()
    match = sync_get_match(db, lock)
    ret = 0
    if match:
        r1_rating = match.r1_rating or tools.DEFAULT_RATING
        r2_rating = match.r2_rating or tools.DEFAULT_RATING
        print('unranked {0:5}({1:.5g}) v {2:5}({3:.5g}) : m {4} s {5}'.format(
            match.r1_id, r1_rating, match.r2_id, r2_rating,
            match.id, match.seed))
        rungame.run_match(db, match)
        ret = 1
    db.ctx.db.close()
    return ret
Esempio n. 7
0
def run_ranked_match(db, match):
    ret = 0
    if match:
        rungame.run_match(db, match)
        ret = 1
    return ret
Esempio n. 8
0
def run_ranked_match(db, match):
    ret = 0
    if match:
        rungame.run_match(db, match)
        ret = 1
    return ret