diff --git a/pyproject.toml b/pyproject.toml index f7f3ff8..a56e149 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ dependencies = [ "scrapy>=2.10.0", "feedparser>=6.0.10", "uvloop>=0.17.0", - "rocketry>=2.5.1", "fastapi>=0.101.0", "uvicorn>=0.22.0", ] diff --git a/snowscraper/cli.py b/snowscraper/cli.py index f07fc21..287dfbf 100644 --- a/snowscraper/cli.py +++ b/snowscraper/cli.py @@ -12,7 +12,6 @@ from .controller import import_scrapers from .controller import run_all app_fastapi = None -app_rocketry = None class SnowScraper(uvicorn.Server): @@ -25,16 +24,13 @@ async def start_server() -> None: print("Starting SnowScraper") server = SnowScraper(config=uvicorn.Config(app_fastapi, workers=1, loop="uvloop")) fastapi = asyncio.create_task(server.serve()) - rocket = asyncio.create_task(app_rocketry.serve()) - app_rocketry.task - await asyncio.wait([rocket, fastapi], return_when=asyncio.FIRST_COMPLETED) + await asyncio.wait([fastapi], return_when=asyncio.FIRST_COMPLETED) def main(args: argparse.Namespace) -> None: - global app_fastapi, app_rocketry + global app_fastapi - from .scheduler import app as app_rocketry from .webserver import app as app_fastapi import_scrapers() diff --git a/snowscraper/scheduler.py b/snowscraper/scheduler.py deleted file mode 100644 index fdf4c12..0000000 --- a/snowscraper/scheduler.py +++ /dev/null @@ -1,6 +0,0 @@ -from rocketry import Rocketry - -app = Rocketry(execution="async") - -if __name__ == "__main__": - app.run()