芹菜和 Scrapyd 的区别
Difference between Celery and Scrapyd
我使用 Portia 构建了一个小的 scrapy 蜘蛛。我已经将它部署在 Scrapyd 中并且工作正常。
经过搜索我发现我们可以使用Celery来调度蜘蛛。
其实Scrapyd和Celery有什么区别?
谁能帮帮我。
谢谢。
Scrapyd focused mainly on deploying scrapy spiders, while Celery 是 运行 以分布式和可扩展方式执行异步任务的通用框架。
你可以一个和另一个一起做。但是你知道的 scrapy 专注于抓取网络,但是使用 celery 你将定义你的任务。
scrapy + scrapyd:Scrapyd 是为 scrapy 构建的,当你 "deploy" 一个新的蜘蛛时,它有点 运行ning scrapy crawl myspider
。 Scrapyd 还提供了一个网络服务来上传和启动新的蜘蛛和一些更多的功能。
scrapy + celery:您需要实现的 celery 任务基本上与 scrapyd
中给出的相同。这种方式的主要优点 IMO 是如果你最终会有 scrapyd 无法提供的要求,那么用 celery 实现它们会更容易,因为在 celery 中你定义自己的任务。
来自Celery:
Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
来自Scrapyd:
Scrapyd is an application for deploying and running Scrapy spiders. It enables you to deploy (upload) your projects and control their spiders using a JSON API.
我使用 Portia 构建了一个小的 scrapy 蜘蛛。我已经将它部署在 Scrapyd 中并且工作正常。
经过搜索我发现我们可以使用Celery来调度蜘蛛。
其实Scrapyd和Celery有什么区别?
谁能帮帮我。
谢谢。
Scrapyd focused mainly on deploying scrapy spiders, while Celery 是 运行 以分布式和可扩展方式执行异步任务的通用框架。
你可以一个和另一个一起做。但是你知道的 scrapy 专注于抓取网络,但是使用 celery 你将定义你的任务。
scrapy + scrapyd:Scrapyd 是为 scrapy 构建的,当你 "deploy" 一个新的蜘蛛时,它有点 运行ning scrapy crawl myspider
。 Scrapyd 还提供了一个网络服务来上传和启动新的蜘蛛和一些更多的功能。
scrapy + celery:您需要实现的 celery 任务基本上与 scrapyd
中给出的相同。这种方式的主要优点 IMO 是如果你最终会有 scrapyd 无法提供的要求,那么用 celery 实现它们会更容易,因为在 celery 中你定义自己的任务。
来自Celery:
Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
来自Scrapyd:
Scrapyd is an application for deploying and running Scrapy spiders. It enables you to deploy (upload) your projects and control their spiders using a JSON API.