listmonk/generate-subs.py
Kailash Nadh 1a39ed15ec Add support for campaign error tracking and auto-pause.
When a campaign exceeds N number of message send errors, for instance
SMTP errors, it is now auto-paused until there is manual intervention.

For this, the master goroutine in runner.Run() that was synchronising
between the tick based DB scanner and subscriber fetching has been
split into two. A new queue aggregates send errors from workers
again a threshold after which the campaign is paused.
2018-11-26 16:40:51 +05:30

15 lines
316 B
Python

import csv
import random
f = open("/tmp/subs.csv", "w+")
w = csv.writer(f)
w.writerow(["email", "name", "status", "attributes"])
for n in range(0, 100000):
w.writerow([
"user%d@mail.com" % (n,),
"First%d Last%d" % (n, n),
"enabled",
"{\"age\": %d, \"city\": \"Bangalore\"}" % (random.randint(20,70),)
])