File tree 3 files changed +16
-2
lines changed 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
- 0.0.6
1
+ 0.0.7
Original file line number Diff line number Diff line change 13
13
from scrapy .utils .project import get_project_settings , inside_project
14
14
15
15
import os_scrapy
16
- from scrapy . crawler import CrawlerProcess
16
+ from . patch import CrawlerProcess
17
17
from os_scrapy .settings import default_settings
18
18
19
19
Original file line number Diff line number Diff line change
1
+ from scrapy .crawler import CrawlerProcess as CP
2
+ from scrapy .utils .reactor import is_asyncio_reactor_installed
3
+
4
+
5
+ class CrawlerProcess (CP ):
6
+ def _handle_twisted_reactor (self ):
7
+ super (CrawlerProcess , self )._handle_twisted_reactor ()
8
+ if is_asyncio_reactor_installed ():
9
+ import asyncio
10
+
11
+ from twisted .internet import reactor
12
+
13
+ if reactor ._asyncioEventloop is not asyncio .get_event_loop ():
14
+ asyncio .set_event_loop (reactor ._asyncioEventloop )
You can’t perform that action at this time.
0 commit comments