Disable Stats Updater when using the InMemory database

This commit is contained in:
Runebaas 2019-03-03 20:38:45 -05:00
parent a1e0c35dd4
commit dbd36a62d3
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -174,13 +174,13 @@ namespace Geekbot.net
var handlers = new Handlers(_databaseInitializer, _client, _logger, _redis, _servicesProvider, _commands, _userRepository, reactionListener); var handlers = new Handlers(_databaseInitializer, _client, _logger, _redis, _servicesProvider, _commands, _userRepository, reactionListener);
_client.MessageReceived += handlers.RunCommand; _client.MessageReceived += handlers.RunCommand;
_client.MessageReceived += handlers.UpdateStats;
_client.MessageDeleted += handlers.MessageDeleted; _client.MessageDeleted += handlers.MessageDeleted;
_client.UserJoined += handlers.UserJoined; _client.UserJoined += handlers.UserJoined;
_client.UserUpdated += handlers.UserUpdated; _client.UserUpdated += handlers.UserUpdated;
_client.UserLeft += handlers.UserLeft; _client.UserLeft += handlers.UserLeft;
_client.ReactionAdded += handlers.ReactionAdded; _client.ReactionAdded += handlers.ReactionAdded;
_client.ReactionRemoved += handlers.ReactionRemoved; _client.ReactionRemoved += handlers.ReactionRemoved;
if (!_runParameters.InMemory) _client.MessageReceived += handlers.UpdateStats;
var webserver = _runParameters.DisableApi ? Task.Delay(10) : StartWebApi(); var webserver = _runParameters.DisableApi ? Task.Delay(10) : StartWebApi();