Project

General

Profile

« Previous | Next » 

Revision 5121

TNRS-related programs: Use "names" instead of "taxons" for variable names because what's being submitted are actually verbatim taxonomic names, not official references to specific taxa

View differences:

tnrs_db
50 50
        while True:
51 51
            # Fetch next set
52 52
            cur = sql.select(db, 'taxonpath', ['taxonomicnamewithauthor'],
53
                [('canon_taxonpath_id', None)], limit=tnrs.max_taxons,
53
                [('canon_taxonpath_id', None)], limit=tnrs.max_names,
54 54
                start=start, cacheable=False)
55 55
            this_ct = cur.rowcount
56 56
            start += this_ct # advance start to fetch next set
......
62 62
                continue # try again
63 63
            # otherwise, rows found
64 64
            total_pause = 0
65
            taxons = list(sql.values(cur))
65
            names = list(sql.values(cur))
66 66
            
67 67
            # Run TNRS
68 68
            log('Processing '+str(this_ct)+' taxonpaths')
69 69
            log('Making TNRS request')
70 70
            tnrs_profiler.start()
71 71
            try:
72
                try: stream = tnrs.repeated_tnrs_request(taxons)
72
                try: stream = tnrs.repeated_tnrs_request(names)
73 73
                finally: tnrs_profiler.stop(iter_ct=this_ct)
74 74
            except tnrs.InvalidResponse: pass # skip set in case it caused error
75 75
            else:

Also available in: Unified diff