Skip to content

Commit

Permalink
json_db: add back profiler to _write
Browse files Browse the repository at this point in the history
follow-up 411098f
  • Loading branch information
SomberNight committed Aug 15, 2023
1 parent 98ccad6 commit 7012d99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion electrum/json_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from typing import TYPE_CHECKING

from . import util
from .util import WalletFileException
from .util import WalletFileException, profiler
from .logging import Logger

if TYPE_CHECKING:
Expand Down Expand Up @@ -272,6 +272,7 @@ def write(self, storage: 'WalletStorage'):
with self.lock:
self._write(storage)

@profiler
def _write(self, storage: 'WalletStorage'):
if threading.current_thread().daemon:
self.logger.warning('daemon thread cannot write db')
Expand Down

0 comments on commit 7012d99

Please sign in to comment.