|
@@ -175,12 +175,13 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
|
|
|
|
|
|
|
|
|
|
|
|
-# if repeat:
|
|
|
-
|
|
|
+ if repeat:
|
|
|
# cursor = db.query('select lat_txt,lon_txt from swire_store_list where num ="'+str(result['num'])+'" and keyword="'+result['kw']+'" order by rand() limit 1')
|
|
|
-# for c in cursor:
|
|
|
-# result['lat']=c['lat_txt']
|
|
|
-# result['lon']=c['lon_txt']
|
|
|
+ cursor = db.query('select lat_txt,lon_txt from swire_store_list order by rand() limit 1')
|
|
|
+
|
|
|
+ for c in cursor:
|
|
|
+ result['lat']=c['lat_txt']
|
|
|
+ result['lon']=c['lon_txt']
|
|
|
|
|
|
return result
|
|
|
|