[Core] Removed flusher, helpers now save on changes

After some considerations, while the flusher was an interesting experiment, it doesn't seem to be reliable enough. It's been removed in favor of the helpers autosaving on any change in a threadsafe way.
This commit is contained in:
Twentysix
2017-04-29 19:25:10 +02:00
parent bd341f1875
commit 9fc4e54ece
6 changed files with 48 additions and 137 deletions

View File

@@ -65,12 +65,12 @@ class Red(commands.Bot):
"""Lists packages present in the cogs the folder"""
return os.listdir("cogs")
def save_packages_status(self):
async def save_packages_status(self):
loaded = []
for package in self.extensions:
if package.startswith("cogs."):
loaded.append(package)
self.db.set_global("packages", loaded)
await self.db.set_global("packages", loaded)
class ExitCodes(Enum):