@@ -131,11 +131,12 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
result['num']=repnum
if 'REP' in repkw:
- repnum=None
- cursor = db.query('select num from swire_store_list where num not in (select num from conv_log) order by rand() limit 1')
- for c in cursor:
- repnum=c['num']
- break
+ if repnum=='REP':
+ repnum=None
+ cursor = db.query('select num from swire_store_list where num not in (select num from conv_log) order by rand() limit 1')
+ for c in cursor:
+ repnum=c['num']
+ break
if repnum is None:
cursor = db.query('select num from swire_store_list order by rand() limit 1')
for c in cursor: