Skip to content

Commit

Permalink
not set schedule field into status_pack if its not exist in task
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed May 22, 2015
1 parent c20deed commit 732eced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TODO

- [x] local mode, load script from file.
- [x] works as a framework (all components running in one process, no threads)
- [ ] redis
- [x] redis
- [x] shell mode like `scrapy shell`
- [ ] a visual scraping interface like [portia](https://github.com/scrapinghub/portia)

Expand Down
3 changes: 2 additions & 1 deletion pyspider/processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def on_task(self, task, response):
'taskid': task['taskid'],
'project': task['project'],
'url': task.get('url'),
'schedule': task.get('schedule', {}),
'track': {
'fetch': {
'ok': response.isok(),
Expand All @@ -166,6 +165,8 @@ def on_task(self, task, response):
'save': ret.save,
},
}
if 'schedule' in task:
status_pack['schedule'] = task['schedule']

# FIXME: unicode_obj should used in scheduler before store to database
# it's used here for performance.
Expand Down

0 comments on commit 732eced

Please sign in to comment.