liquid_feedback_frontend
diff app/main/_prefork/10_init.lua @ 1248:c0fd12b97d65
Changes on notifications system, newsletter support added
| author | bsw |
|---|---|
| date | Tue Apr 05 20:40:37 2016 +0200 (2016-04-05) |
| parents | a3e9e3433852 |
| children | 84f6e17c7ceb |
line diff
1.1 --- a/app/main/_prefork/10_init.lua Wed Jan 27 11:16:26 2016 +0100 1.2 +++ b/app/main/_prefork/10_init.lua Tue Apr 05 20:40:37 2016 +0200 1.3 @@ -134,8 +134,20 @@ 1.4 proto = "interval", 1.5 name = "send_pending_notifications", 1.6 delay = 5, 1.7 - handler = function() 1.8 - Event:send_pending_notifications() 1.9 + handler = function() 1.10 + while true do 1.11 + local did_work = false 1.12 + local tmp 1.13 + tmp = Newsletter:send_next_newsletter() 1.14 + if tmp then did_work = true end 1.15 + tmp = Event:send_next_notification() 1.16 + if tmp then did_work = true end 1.17 + tmp = InitiativeForNotification:notify_next_member() 1.18 + if tmp then did_work = true end 1.19 + if not did_work then 1.20 + break 1.21 + end 1.22 + end 1.23 end 1.24 }, 1.25 min_fork = 1,