Skip to content

Commit 27348aa

Browse files
sap_hana: correct misleading cancel() comment
cancel() only sets each job's cancel event; it does not itself close the schema job's dedicated HANA connection. Reword the comment to reflect what cancel() actually does, per DBM review feedback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4435183 commit 27348aa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sap_hana/datadog_checks/sap_hana/sap_hana.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ def check(self, _):
159159
self._connection_flaked = False
160160

161161
def cancel(self):
162-
# Signal both async jobs to stop so their executor threads (and the schema job's
163-
# dedicated HANA connection) are released when the check is unscheduled (e.g.
164-
# cluster-agent flavor or one-off check invocations), instead of leaking the
165-
# DBMAsyncJob thread pool.
162+
# Signal both async jobs to stop so their executor threads are released when the
163+
# check is unscheduled (e.g. cluster-agent flavor or one-off check invocations),
164+
# instead of leaking the shared DBMAsyncJob thread pool. This only sets each job's
165+
# cancel event; it does not itself close the schema job's dedicated HANA connection.
166166
self._schema_collection_job.cancel()
167167
self.data_observability.cancel()
168168

0 commit comments

Comments
 (0)