aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/scripts/fietscron.py2
-rw-r--r--fietsboek/views/detail.py4
-rw-r--r--fietsboek/views/upload.py3
3 files changed, 8 insertions, 1 deletions
diff --git a/fietsboek/scripts/fietscron.py b/fietsboek/scripts/fietscron.py
index e422fb2..897078c 100644
--- a/fietsboek/scripts/fietscron.py
+++ b/fietsboek/scripts/fietscron.py
@@ -142,7 +142,7 @@ def refill_queue(session: Session, redis: Redis):
"""Refills the low-priority hittekaart queue by adding all users to it."""
LOGGER.debug("Refilling low-priority queue")
for user in session.execute(select(models.User)).scalars():
- redis.sadd("hittekaart:queue:low", str(user.id))
+ redis.sadd("hittekaart:queue:low", user.id)
__all__ = ["cli"]
diff --git a/fietsboek/views/detail.py b/fietsboek/views/detail.py
index 259e5d6..f540a11 100644
--- a/fietsboek/views/detail.py
+++ b/fietsboek/views/detail.py
@@ -138,6 +138,10 @@ def delete_track(request):
request.dbsession.delete(track)
request.data_manager.purge(track_id)
request.session.flash(request.localizer.translate(_("flash.track_deleted")))
+
+ if request.config.hittekaart_autogenerate:
+ request.redis.sadd("hittekaart:queue:high", request.identity.id)
+
return HTTPFound(request.route_url("home"))
diff --git a/fietsboek/views/upload.py b/fietsboek/views/upload.py
index fd93034..6fccdba 100644
--- a/fietsboek/views/upload.py
+++ b/fietsboek/views/upload.py
@@ -187,6 +187,9 @@ def do_finish_upload(request):
request.session.flash(request.localizer.translate(_("flash.upload_success")))
+ if request.config.hittekaart_autogenerate:
+ request.redis.sadd("hittekaart:queue:high", request.identity.id)
+
return HTTPFound(request.route_url("details", track_id=track.id))