Add application execution action for data manipulation bot
This commit is contained in:
@@ -141,7 +141,7 @@ class DatabaseClient(Application):
|
||||
:param sql: The SQL query.
|
||||
:return: True if the query was successful, otherwise False.
|
||||
"""
|
||||
if self.connected and self.operating_state.RUNNING:
|
||||
if self.connected and self.operating_state == ApplicationOperatingState.RUNNING:
|
||||
query_id = str(uuid4())
|
||||
|
||||
# Initialise the tracker of this ID to False
|
||||
|
||||
@@ -50,7 +50,7 @@ class DataManipulationBot(DatabaseClient):
|
||||
def _init_request_manager(self) -> RequestManager:
|
||||
rm = super()._init_request_manager()
|
||||
|
||||
rm.add_request(name="execute", request_type=RequestType(func=self.execute))
|
||||
rm.add_request(name="execute", request_type=RequestType(func=lambda request, context: self.execute()))
|
||||
|
||||
return rm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user