On 04/27/2018 01:15 PM, John M Knoeller wrote:
...
Yeah, I was wrong anyway, I must've been thinking about catching a
GeneratorClose in a coroutine.
Nobody's going to stop us from doing "for foo in itemdata :
sub.queue(txn,(foo,))" anyway. Some sort of commit() would be my choice,
along the lines of
with schedd.transaction() as txn :
with sub.queue(txn) as q :
for foo in itemdata :
q.queue(foo)
with implicit q.commit() on exit from context, or explicit for those who
want it.
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
Attachment:
signature.asc
Description: OpenPGP digital signature