Revision 5152
Added by Aaron Marcuse-Kubitza about 12 years ago
tnrs_db | ||
---|---|---|
45 | 45 |
tnrs_profiler = profiling.ItersProfiler(iter_text='name') |
46 | 46 |
|
47 | 47 |
# Iterate over unscrubbed verbatim taxonpaths |
48 |
start = 0 |
|
49 | 48 |
total_pause = 0 |
50 | 49 |
tables = ['taxonpath', sql_gen.Join('tnrs', |
51 | 50 |
{'Name_submitted': 'taxonomicnamewithauthor'}, sql_gen.filter_out)] |
... | ... | |
53 | 52 |
# Fetch next set |
54 | 53 |
cur = sql.select(db, tables, ['taxonomicnamewithauthor'], |
55 | 54 |
[('canon_taxonpath_id', None)], limit=tnrs.max_names, |
56 |
start=start, cacheable=False)
|
|
55 |
cacheable=False) |
|
57 | 56 |
this_ct = cur.rowcount |
58 |
start += this_ct # advance start to fetch next set |
|
59 | 57 |
if this_ct == 0: |
60 | 58 |
total_pause += pause |
61 | 59 |
if total_pause > max_pause: break |
Also available in: Unified diff
tnrs_db: Fixed bug where the new filtering out of already-scrubbed names caused names to be skipped, because the loop would both advance by the number of rows found and those rows would no longer be returned by the query, causing only every other set of rows to be processed