Skip to content
Merged
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
2 changes: 1 addition & 1 deletion faust/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ async def on_first_start(self) -> None:
worker is restarted by an exception being raised.
"""
self.change_workdir(self.workdir)
self.autodiscover()
await self.default_on_first_start()
self.autodiscover()

def change_workdir(self, path: Path) -> None:
"""Change the current working directory (CWD)."""
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ async def test_on_first_start(self, worker):
worker.default_on_first_start = AsyncMock(name="on_first_start")
await worker.on_first_start()
worker.change_workdir.assert_called_once_with(worker.workdir)
worker.autodiscover.assert_called_once_with()
worker.default_on_first_start.assert_called_once_with()
worker.autodiscover.assert_called_once_with()

def test_change_workdir(self, worker):
with patch("os.chdir") as chdir:
Expand Down