Fix scores not degrading due to missing session.commit()

This commit is contained in:
rubenwardy 2020-03-22 19:46:46 +00:00
parent 99548ea65f
commit b0f32affcb
1 changed files with 3 additions and 2 deletions

View File

@ -15,9 +15,10 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from app.models import Package
from app.models import Package, db
from app.tasks import celery
@celery.task()
def updatePackageScores():
Package.query.update({ "score": Package.score * 0.8 })
Package.query.update({ "score": Package.score * 0.95 })
db.session.commit()