Skip to content

Commit

Permalink
redis set ds used instead list
Browse files Browse the repository at this point in the history
  • Loading branch information
nava45 committed Jul 30, 2014
1 parent 53dff72 commit 434a667
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def view_search():
def recrawl():
kw = request.args.get('search',None)
if kw:
redis.lpush(REDIS_CRAWLER_KEY,kw)
redis.sadd(REDIS_CRAWLER_KEY,kw)
#crawler_machine(kw)
flash("you have rescheduled it for '%s'.It will happen sooner or later" %kw)
return redirect(url_for('.view_search'))
Expand Down
2 changes: 1 addition & 1 deletion redis_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def work():
while 1:
msg = redis.lpop(REDIS_CRAWLER_KEY)
msg = redis.spop(REDIS_CRAWLER_KEY)
crawler_machine(msg)

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<div class="starter-template">
<h1>Flipkart Scraper</h1>
<p class="lead small">Use this crawled data from flipkart.com<br> All you get is price and ratings of the items that were biten already.</p>
<p class="lead small">night watchman of flipkart.com<br> All you get is price and ratings of the items that were biten already.</p>
</div>

<form class="form" action="" method="post" name="new-service" enctype=multipart/form-data>
Expand Down

0 comments on commit 434a667

Please sign in to comment.