change executor to 1 (#3299)

* Limit Playlists

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* 1

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
Draper 2020-01-09 16:13:32 +00:00 committed by Michael H
parent e75b5b3be5
commit 3546dd14d0

View File

@ -141,7 +141,7 @@ class CacheInterface:
maxage = datetime.datetime.now(tz=datetime.timezone.utc) - datetime.timedelta(days=max_age) maxage = datetime.datetime.now(tz=datetime.timezone.utc) - datetime.timedelta(days=max_age)
maxage_int = int(time.mktime(maxage.timetuple())) maxage_int = int(time.mktime(maxage.timetuple()))
values = {"maxage": maxage_int} values = {"maxage": maxage_int}
with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor: with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
executor.submit(self.database.execute, LAVALINK_DELETE_OLD_ENTRIES, values) executor.submit(self.database.execute, LAVALINK_DELETE_OLD_ENTRIES, values)
executor.submit(self.database.execute, YOUTUBE_DELETE_OLD_ENTRIES, values) executor.submit(self.database.execute, YOUTUBE_DELETE_OLD_ENTRIES, values)
executor.submit(self.database.execute, SPOTIFY_DELETE_OLD_ENTRIES, values) executor.submit(self.database.execute, SPOTIFY_DELETE_OLD_ENTRIES, values)