Skip to content

Commit

Permalink
Read ScrapydDeploy schedule data from _schedule_data method
Browse files Browse the repository at this point in the history
  • Loading branch information
ruairif committed Jun 5, 2018
1 parent 24bdb44 commit 30217a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions portia_server/portia_api/utils/deploy/scrapyd.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def deploy(self, target='default'):
}

def schedule(self, spider, args=None, settings=None, target=None):
schedule_data = self._schedule_data(spider, self.data)
schedule_data = self._schedule_data(
spider, self._schedule_data(spider, args))
request = requests.post(
urljoin(app_settings.SCRAPYD_URL, '/schedule.json',
data=schedule_data))
urljoin(app_settings.SCRAPYD_URL, 'schedule.json'),
data=schedule_data)
if request.status_code != 200:
raise JsonApiGeneralException(
request.status_code, request.content)
Expand Down

0 comments on commit 30217a8

Please sign in to comment.