E570 Gracefully handle Cassandra connection errors · tschellenbach/Stream-Framework@0fd32fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fd32fc

Browse files
committed
Gracefully handle Cassandra connection errors
1 parent 94cd7b3 commit 0fd32fc

File tree

Expand file tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stream_framework/storage/cassandra/timeline_storage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ class CassandraTimelineStorage(BaseTimelineStorage):
7474
"""
7575

7676
from stream_framework.storage.cassandra.connection import setup_connection
77-
setup_connection()
77+
try:
78+
setup_connection()
79+
except Exception as e:
80+
logger.error('Failed to setup Cassandra connection: %s', e, exc_info=True)
7881

7982
default_serializer_class = CassandraActivitySerializer
8083
insert_batch_size = 100

0 commit comments

Comments
 (0)
0