mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Fix deleteing more than 1000 history entries at the same time
This commit is contained in:
parent
4a8748e322
commit
ad195f0969
2 changed files with 16 additions and 7 deletions
|
@ -31,7 +31,7 @@ import datetime
|
|||
from functools import wraps
|
||||
import hashlib
|
||||
import imghdr
|
||||
from future.moves.itertools import zip_longest
|
||||
from future.moves.itertools import islice, zip_longest
|
||||
import ipwhois
|
||||
import ipwhois.exceptions
|
||||
import ipwhois.utils
|
||||
|
@ -1068,6 +1068,11 @@ def grouper(iterable, n, fillvalue=None):
|
|||
return zip_longest(fillvalue=fillvalue, *args)
|
||||
|
||||
|
||||
def chunk(it, size):
|
||||
it = iter(it)
|
||||
return iter(lambda: tuple(islice(it, size)), ())
|
||||
|
||||
|
||||
def traverse_map(obj, func):
|
||||
if isinstance(obj, list):
|
||||
new_obj = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue