• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 15534384297
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1497-show-most-recently-created-qual-answer
DEFAULT BRANCH: master
Ran 09 Jun 2025 12:57PM UTC
Jobs 2
Files 653
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jun 2025 12:21PM UTC coverage: 81.055% (-0.005%) from 81.06%
15534384297

push

github

web-flow
fix(massEmails): make sure sends are not interrupted when configs change TASK-1835 (#5810)

### 📣 Summary
Ensure emails continue to be sent throughout the day even when
configurations are changed before the send is over.



### 📖 Description
Fixes a bug wherein if sending all mass emails took more than an hour
(either because of volume or because the process was killed) and new
configurations were added before all emails had been sent, emails would
stop sending for the rest of the day. The same thing would happen if an
existing configuration was removed from the daily send list.


### 💭 Notes
Before sending any emails, the `send_emails` job tries to verify that
all send lists for the day have been generated. Previously, it did this
by making sure the list of all live email configurations matched the
list of processed configurations that had been cached by
`generate_mass_email_user_lists`. However, this created a problem when
the list of live email configurations changed between the run of
`generate_mass_email_user_lists` and a run of send_emails occurring
later on the same day, either because someone added a new configuration
and set it live or because they took an existing configuration and took
it out of the daily send.

This PR fixes this issue by updating the `send_emails` task to only
check that the `generate_mass_email_user_lists` task has put *something*
in the cache, rather than checking that all live configs are there. This
is because setting the cache key is the last thing the
`generate_mass_email_user_lists` task does, so if the cache key is set,
that means we have already created all the send lists we need for the
day. This also updates the `generate_mass_email_user_lists` task to only
generate the list of configs once rather than re-checking it every time.
This ensures that while it will still try again if it fails, it will not
add new configurations in the middle of the day.

Note this does mean that even if an email configuration is rem... (continued)

6283 of 9953 branches covered (63.13%)

5 of 8 new or added lines in 1 file covered. (62.5%)

23930 of 29523 relevant lines covered (81.06%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
93.53
-0.56% kobo/apps/mass_emails/tasks.py
Jobs
ID Job ID Ran Files Coverage
1 15534384297.1 09 Jun 2025 12:57PM UTC 653
78.96
2 15534384297.2 09 Jun 2025 12:59PM UTC 653
81.04
Source Files on build 15534384297
  • Tree
  • List 653
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • dd04a9f5 on github
  • Prev Build on main (#15526434507)
  • Next Build on main (#15535886076)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc