fixthestatusquo / fixthestatusquo/proca-server

put failsafe limits on MTT

Open
#232 3 comments 0 reactions 1 assignee Assigned to @destag View on GitHub
Dominant language
Elixir
Stars
11
Forks
13
Avg merge
6d 14h
Merged PRs (30d)
2

Description

Currently, if you by mistake change the end date to a date close to now and there are still emails to sent, it will try to push them all, risking a flood and blacklisting

When checking for emails to send , add a limit to no more than PROCA_MAX_HOURLY_EMAIL (environment variable, adjust the name to make it more proca way of doing things if needed) defaults to 99 emails per hour. and no less than 1,

so if the campaign setting is set to send from 1st of april to the 30 of april from 9am to 17h (30 daysx10 hours):

- if on the 1st of april at 8am there are 30 emails to send, don't spread them over the next 30 days until the end of the campaign (and send 1 per day), send minimum 10 on the first of april (one per hour), 10 on the second and 10 on the 3rd), hopefully there will be more coming for the rest of the campaign
- if on the 30st of april at 16h, we get 200 emails, we send only 99 and don't send the final 101.

the aim of the later is to prevent spamming the target "too much" if there is a mistake on the setting or when we change the end date/hour.

v2/unless trivial: Put another limit of how many emails per target can be sent in total (global default, can be overwritten by campaign), max 10k

@hiemanshu while you look at the current code, can you confirm it does properly spread sending the emails over the sending period queried (one hour) vs sending all the batch at the start of the hour?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.