Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions deadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def pid(self, value):
try:
self.pid_callback(self._pid)
except Exception: # pragma: no cover
logger.exception(f"Error calling pid_callback")
logger.exception("Error calling pid_callback")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Future.pid refactored with the following changes:


def add_pid_callback(self, fn):
self.pid_callback = fn
Expand Down Expand Up @@ -160,7 +160,7 @@ def timed_out():
try:
self.running_jobs.get_nowait()
except Empty: # pragma: no cover
logger.warning(f"Weird error, did not expect running jobs to be empty")
logger.warning("Weird error, did not expect running jobs to be empty")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Deadpool.run_process refactored with the following changes:


def submit(self, __fn: Callable, *args, timeout=None, **kwargs) -> Future:
if self.closed:
Expand Down Expand Up @@ -193,7 +193,7 @@ def raw_runner(conn: Connection, fn, args, kwargs, initializer, initargs, finiti
try:
initializer(*initargs)
except:
logger.exception(f"Initializer failed")
logger.exception("Initializer failed")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function raw_runner refactored with the following changes:


try:
results = fn(*args, **kwargs)
Expand All @@ -208,7 +208,7 @@ def raw_runner(conn: Connection, fn, args, kwargs, initializer, initargs, finiti
try:
finitializer(*finitargs)
except:
logger.exception(f"Finitializer failed")
logger.exception("Finitializer failed")


# Taken fromhttps
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def f_err(exception_class, *args, **kwargs):


def test_abc():
assert 1 == 1
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function test_abc refactored with the following changes:



def test_simple():
Expand Down