mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-24 15:01:35 +01:00
Fix scores not degrading due to missing session.commit()
This commit is contained in:
parent
99548ea65f
commit
b0f32affcb
@ -15,9 +15,10 @@
|
|||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# 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
|
from app.tasks import celery
|
||||||
|
|
||||||
@celery.task()
|
@celery.task()
|
||||||
def updatePackageScores():
|
def updatePackageScores():
|
||||||
Package.query.update({ "score": Package.score * 0.8 })
|
Package.query.update({ "score": Package.score * 0.95 })
|
||||||
|
db.session.commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user