mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Increase timeout when adding files to 10 minutes
This commit is contained in:
parent
0a588b7b0d
commit
4ced832557
@ -222,6 +222,8 @@ class DBAdder(Thread):
|
|||||||
|
|
||||||
class Adder(QObject):
|
class Adder(QObject):
|
||||||
|
|
||||||
|
ADD_TIMEOUT = 600 # seconds
|
||||||
|
|
||||||
def __init__(self, parent, db, callback, spare_server=None):
|
def __init__(self, parent, db, callback, spare_server=None):
|
||||||
QObject.__init__(self, parent)
|
QObject.__init__(self, parent)
|
||||||
self.pd = ProgressDialog(_('Adding...'), parent=parent)
|
self.pd = ProgressDialog(_('Adding...'), parent=parent)
|
||||||
@ -328,7 +330,7 @@ class Adder(QObject):
|
|||||||
except Empty:
|
except Empty:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if (time.time() - self.last_added_at) > 300:
|
if (time.time() - self.last_added_at) > self.ADD_TIMEOUT:
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
self.pd.hide()
|
self.pd.hide()
|
||||||
self.db_adder.end = True
|
self.db_adder.end = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user