Skip to content

Commit

Permalink
tasks bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Dec 1, 2024
1 parent a9bfa43 commit e54d53c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions say/tasks/update_needs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from time import sleep

from sqlalchemy import or_
from sqlalchemy import or_, and_

from say.celery import celery
from say.orm import safe_commit
Expand All @@ -12,7 +12,7 @@ def update_needs(self):

needs = self.session.query(Need).filter(
Need.type == 1,
or_(
and_(
Need.status < 4,
Need.title.is_(None),
),
Expand All @@ -39,7 +39,7 @@ def update_needs(self):
def update_need(self, need_id, force=False):
from say.models.need_model import Need

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

0 comments on commit e54d53c

Please sign in to comment.