Skip to content

Commit 5d021fc

Browse files
committed
_commit_with_lock submethods to snake case
1 parent cd33433 commit 5d021fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

server/recceiver/cfstore.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,21 +380,21 @@ def _commit_with_lock(self, transaction: interfaces.ITransaction) -> defer.Defer
380380

381381
t = deferToThread(self._commit_with_thread, transaction)
382382

383-
def cancelCommit(d: defer.Deferred):
383+
def cancel_commit(d: defer.Deferred):
384384
"""Cancel the commit operation."""
385385
self.cancelled = True
386386
d.callback(None)
387387

388-
d: defer.Deferred = defer.Deferred(cancelCommit)
388+
d: defer.Deferred = defer.Deferred(cancel_commit)
389389

390-
def waitForThread(_ignored):
390+
def wait_for_thread(_ignored):
391391
"""Wait for the commit thread to finish."""
392392
if self.cancelled:
393393
return t
394394

395-
d.addCallback(waitForThread)
395+
d.addCallback(wait_for_thread)
396396

397-
def chainError(err):
397+
def chain_error(err):
398398
"""Handle errors from the commit thread.
399399
400400
Note this is not foolproof as the thread may still be running.
@@ -408,7 +408,7 @@ def chainError(err):
408408
else:
409409
d.callback(None)
410410

411-
def chainResult(result):
411+
def chain_result(result):
412412
"""Handle successful completion of the commit thread.
413413
414414
If the commit was cancelled, raise CancelledError.
@@ -418,7 +418,7 @@ def chainResult(result):
418418
else:
419419
d.callback(None)
420420

421-
t.addCallbacks(chainResult, chainError)
421+
t.addCallbacks(chain_result, chain_error)
422422
return d
423423

424424
def transaction_to_record_infos(self, ioc_info: IocInfo, transaction: CommitTransaction) -> Dict[str, RecordInfo]:

0 commit comments

Comments
 (0)