Fix exception reporting
This commit is contained in:
parent
73d214615e
commit
df9493f6cd
|
@ -49,8 +49,10 @@ class CancelMin(types.DurationPreference):
|
|||
name = "min_cancel_time"
|
||||
default = datetime.timedelta(hours=6)
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class SMSRate(types.IntegerPreference):
|
||||
section = helper
|
||||
name = "sms_rate"
|
||||
default = 2
|
||||
default = 2
|
||||
help_text = "Number of SMS sent per minute"
|
||||
|
|
|
@ -29,7 +29,9 @@ def send_messages():
|
|||
print("sms disabled, not sending")
|
||||
return
|
||||
|
||||
msgs = Message.objects.select_for_update().filter(sent_at__isnull=True)[:global_preferences['helper__sms_rate']*2]
|
||||
msgs = Message.objects.select_for_update().filter(sent_at__isnull=True)[
|
||||
: global_preferences["helper__sms_rate"] * 2
|
||||
]
|
||||
with transaction.atomic():
|
||||
for msg in msgs:
|
||||
if msg.sent_at:
|
||||
|
@ -38,7 +40,7 @@ def send_messages():
|
|||
send(msg)
|
||||
msg.sent_at = timezone.now()
|
||||
msg.save()
|
||||
except e:
|
||||
except Exception as e:
|
||||
sentry_sdk.capture_exception(e)
|
||||
|
||||
|
||||
|
@ -80,5 +82,5 @@ def send_reminders():
|
|||
continue
|
||||
try:
|
||||
reg.send_reminder()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
sentry_sdk.capture_exception(e)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="notification">Diese Schicht ist bereits besetzt.</div>
|
||||
{% endif %}
|
||||
<div class="content">
|
||||
<strong>Ort:</strong> <a href="{% url 'pages:view' 'map' %}#{{shift.room.name|slugify}}">{{ shift.room.name }} 📍</a><br>
|
||||
<strong>Ort:</strong> <a href="{% url 'pages:view' 'map' %}#{{ shift.room.name|slugify }}">{{ shift.room.name }} 📍</a><br>
|
||||
<strong>Beginn:</strong> {{ shift.start_at }}<br>
|
||||
<strong>Dauer:</strong> {{ shift.duration }}<br>
|
||||
<strong>Treffpunkt:</strong> {{ shift.room.meeting_location }}<br>
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
<div class="content">
|
||||
<h5 class="mb-2">Hier erscheint bald die Karte mit allen Schichtstandorten</h5>
|
||||
</div>
|
||||
<h5 class="subtitle">Hier erscheint bald die Karte mit allen Schichtstandorten</h5>
|
||||
|
|
Loading…
Reference in New Issue