Skip to content

Commit 0dc775c

Browse files
authored
Do not close nested_event_loop in the Scheduler.__del__ (#168)
1 parent eea224c commit 0dc775c

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Internal changes
66

77
- Allowed running integration tests from PRs from forks, after maintainer approval
8+
- Do not close `nested_event_loop` in the `Scheduler.__del__`.
89

910
## [1.5.0](../../releases/tag/v1.5.0) - 2024-01-03
1011

src/apify/scrapy/scheduler.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ def open(self: ApifyScheduler, spider: Spider) -> None: # noqa: A003 # this has
4949
traceback.print_exc()
5050
raise
5151

52-
def close(self: ApifyScheduler, reason: str) -> None:
53-
"""Close the scheduler.
54-
55-
Args:
56-
reason: The reason for closing the scheduler.
57-
"""
58-
Actor.log.debug(f'ApifyScheduler.close was called (reason={reason})...')
59-
nested_event_loop.stop()
60-
nested_event_loop.close()
61-
6252
def has_pending_requests(self: ApifyScheduler) -> bool:
6353
"""Check if the scheduler has any pending requests.
6454

0 commit comments

Comments
 (0)