Skip to content

Commit

Permalink
fresh product changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Sep 21, 2024
1 parent 1bf56cc commit 6de0dd6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion say/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
'update-needs': {
'task': 'say.tasks.update_needs.update_needs',
'schedule': crontab(minute=15, hour='0,4,8,12,15,20'),
'schedule': crontab(minute=30, hour='0,4,8,12,15,20'),
},
'report_to_family': {
'task': 'say.tasks.report_to_family.report_to_families',
Expand Down
4 changes: 2 additions & 2 deletions say/models/need_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,13 @@ def current_participants(self):
paid=past_participation.paid,
)

def update(self,need_id, force=False):
def update(self, force=False):
from say.crawler import Crawler
from say.crawler import DigikalaCrawler

if 'digikala' in self.link:
print("updating via crawler.....")
data = DigikalaCrawler(self.link).get_data(need_id, force=force)
data = DigikalaCrawler(self.link).get_data(force=force)
else:
data = Crawler(self.link).get_data(force=force)

Expand Down
2 changes: 1 addition & 1 deletion say/tasks/update_needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def update_need(self, need_id, force=False):

sleep(5)
need = self.session.query(Need).get(need_id)
data = need.update(need_id, force=force)
data = need.update(force=force)
safe_commit(self.session)

return data

0 comments on commit 6de0dd6

Please sign in to comment.