Skip to content

Commit 2147489

Browse files
committed
fix: Resolve dependency issue with sql stores
1 parent 9d12c58 commit 2147489

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/a2a/server/tasks/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""Components for managing tasks within the A2A server."""
22

3+
import logging
4+
35
from a2a.server.tasks.base_push_notification_sender import (
46
BasePushNotificationSender,
57
)
6-
from a2a.server.tasks.database_task_store import DatabaseTaskStore
78
from a2a.server.tasks.inmemory_push_notification_config_store import (
89
InMemoryPushNotificationConfigStore,
910
)
@@ -18,6 +19,18 @@
1819
from a2a.server.tasks.task_updater import TaskUpdater
1920

2021

22+
log = logging.getLogger(__name__)
23+
24+
try:
25+
from a2a.server.tasks.database_task_store import DatabaseTaskStore
26+
except ImportError as e:
27+
# If the database task store is not available, we can still use in-memory stores.
28+
log.debug(
29+
'DatabaseTaskStore not loaded. This is expected if database dependencies are not installed. Error: %s',
30+
e,
31+
)
32+
DatabaseTaskStore = None
33+
2134
__all__ = [
2235
'BasePushNotificationSender',
2336
'DatabaseTaskStore',

0 commit comments

Comments
 (0)