File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
investing_bot_framework/core/context Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change 33from investing_bot_framework .core .configuration import settings
44from investing_bot_framework .core .exceptions import OperationalException
55from investing_bot_framework .core .utils import Singleton
6- from investing_bot_framework .core .context . states import BotState
6+ from investing_bot_framework .core .states import BotState
77
88
99class BotContext (metaclass = Singleton ):
@@ -19,11 +19,6 @@ class BotContext(metaclass=Singleton):
1919 settings = settings
2020
2121 def register_initial_state (self , bot_state : Type [BotState ]) -> None :
22-
23- # Stop the current state of the investing_bot_framework
24- if self ._state :
25- self ._state .stop ()
26-
2722 self ._state = bot_state (context = self )
2823
2924 def transition_to (self , bot_state : Type [BotState ]) -> None :
@@ -65,18 +60,3 @@ def _run_state(self) -> None:
6560 transition_state = self ._state .get_transition_state_class ()
6661 self .transition_to (transition_state )
6762
68- def stop (self ) -> None :
69- """
70- Stop the current state of the investing_bot_framework
71- """
72-
73- self ._check_state (raise_exception = True )
74- self ._state .stop ()
75-
76- def reconfigure (self ) -> None :
77- """
78- Reconfigure the current state of the investing_bot_framework
79- """
80-
81- self ._check_state (raise_exception = True )
82- self ._state .reconfigure ()
You can’t perform that action at this time.
0 commit comments