Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Oct 23, 2023
1 parent 8c5f3e5 commit 11bdbe8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bbot/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ async def ping(self):

@property
def batch_size(self):
batch_size = self.options.get("batch_size", None)
batch_size = self.config.get("batch_size", None)
# only allow overriding the batch size if its default value is greater than 1
# this prevents modules from being accidentally neutered by an incorect batch_size setting
if batch_size is None or (self._batch_size > 1 and batch_size <= 1):
if batch_size is None or self._batch_size == 1:
batch_size = self._batch_size
return batch_size

@property
def max_event_handlers(self):
max_event_handlers = self.options.get("max_event_handlers", None)
max_event_handlers = self.config.get("max_event_handlers", None)
if max_event_handlers is None:
max_event_handlers = self._max_event_handlers
return max_event_handlers
Expand Down

0 comments on commit 11bdbe8

Please sign in to comment.