Menu

Two emails about a new campaign, and whichever one goes first cancels the other for good
📰

Two emails about a new campaign, and whichever one goes first cancels the other for good

DEV Community: postgres·Daniel Pertu·9 days ago
#XToQNdZK
#devtopostgresql#devto#dev#campaign#email
Reading 0:00
15s threshold

A campaign in Nakodo is meant to be launched and then left alone, which how it works describes from the outside. The awkward part of that promise is the first hour. You press launch, a progress line starts moving, and then you close the tab, and whatever happens next has to reach you by email.

Two things can happen next. Either the first good fits arrive, or a day passes and none do. So there are two emails, written by two functions in the same file, and most of the design is in making sure you never get both.

The good one waits for a quorum, or an hour

The naive version sends as soon as there is one result.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.