Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Fix new services require bot restart #48

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

benpbo
Copy link

@benpbo benpbo commented Jun 23, 2024

I noticed that currently when a new service is added it isn't being parsed due to the BurgerBot.services field not being updated when a new service is added by a user, also this field is passed as a reference to the Parser but also later on replaced by a new list object.
In order to fix this issue I created a single source of truth, the users, and every time when the parse function is called the currently looked for services are aggregated and sent to the Parser.parse method.
I also changed to user field to a dictionary to help with finding the user when performing user specific operations such as adding or removing a service.
Other then that, there are also some fixes to the type hints.

benpbo and others added 9 commits June 16, 2024 19:44
Remove service lists from Parser and Burger bot and instead pass the
services to `Parser.parse()` method in order to have a single source of
truth when parser.
This fixes the issue where a user adds a service but it isn't parsed
until the bot is restarted.
Fix services not updated for parsing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant