Skip to content

Commit

Permalink
Update docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
smk4664 committed Dec 20, 2024
1 parent 6e65ebd commit 2254a4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nautobot_chatops/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
class DatabaseSyncToAsync(SyncToAsync):
"""
SyncToAsync version that cleans up old database connections when it exits.
Sourced from Channels, see NOTICE file for license information.
"""

def thread_handler(self, loop, *args, **kwargs):
"""Run the handler in a thread, closing old database connections before and after."""
close_old_connections()
try:
return super().thread_handler(loop, *args, **kwargs)
Expand All @@ -36,6 +38,7 @@ def thread_handler(self, loop, *args, **kwargs):
# The class is TitleCased, but we want to encourage use as a callable/decorator
database_sync_to_async = DatabaseSyncToAsync


def get_app_config_part(prefix: str) -> dict:
"""Get part of the app config.
Expand Down

0 comments on commit 2254a4d

Please sign in to comment.