mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
pass through extra args to run()
This commit is contained in:
parent
a43fb74464
commit
edf68edaa2
@ -66,13 +66,14 @@ class RethinkerWrapper(object):
|
||||
result.close()
|
||||
conn.close()
|
||||
|
||||
def run(self, db=None):
|
||||
def run(self, db=None, **kwargs):
|
||||
self.wrapped.run # raise AttributeError early
|
||||
while True:
|
||||
conn = self.rr._random_server_connection()
|
||||
is_iter = False
|
||||
try:
|
||||
result = self.wrapped.run(conn, db=db or self.rr.dbname)
|
||||
result = self.wrapped.run(
|
||||
conn, db=db or self.rr.dbname, **kwargs)
|
||||
if hasattr(result, '__next__'):
|
||||
is_iter = True
|
||||
g = self._result_iter(conn, result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user