Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
select schedule field from database when select_task for auto_recrawl
Browse files Browse the repository at this point in the history
fix #205
  • Loading branch information
binux committed May 22, 2015
1 parent a2c845f commit a46dd6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyspider/database/redis/taskdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def _parse(self, data):
if 'status' in data:
data['status'] = int(data['status'])
if 'lastcrawltime' in data:
data['lastcrawltime'] = float(data['lastcrawltime'])
data['lastcrawltime'] = float(data['lastcrawltime'] or 0)
if 'updatetime' in data:
data['updatetime'] = float(data['updatetime'])
data['updatetime'] = float(data['updatetime'] or 0)
return data

def _stringify(self, data):
Expand Down
1 change: 1 addition & 0 deletions pyspider/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def _check_cronjob(self):
'project',
'url',
'status',
'schedule',
'fetch',
'process',
'track',
Expand Down

1 comment on commit a46dd6a

@horrower
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now. Thanks.

Please sign in to comment.