Skip to content

Commit f73f04b

Browse files
authored
fix email verification rate-limiting and race conditions (#2558)
1 parent 7ba14ec commit f73f04b

File tree

37 files changed

+577
-420
lines changed

37 files changed

+577
-420
lines changed

.env.docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ REDIS_SIGNATURE_STREAM_CONSUMER_GROUP = 'email-signature-consumer-group'
2424
REDIS_CLEANING_STREAM_CONSUMER_GROUP = 'email-verification-consumer-group' # consumer group for cleaning worker
2525
REDIS_EXTRACTING_STREAM_CONSUMER_GROUP = 'email-messages-consumer-group' # Consumer group for extracting worker
2626
REDIS_EMAIL_SIGNATURE_CONSUMER_BATCH_SIZE = 500
27-
REDIS_EMAIL_VERIFICATION_CONSUMER_BATCH_SIZE = 500
27+
REDIS_EMAIL_VERIFICATION_CONSUMER_BATCH_SIZE = 1000
2828

2929
SIGNATURE_USE_LLM = false
3030
SIGNATURE_OPENROUTER_API_KEY = 'test-key'
@@ -107,7 +107,7 @@ REDIS_MAXMEMORY = 1gb # ( REQUIRED ) Max memory used by redis,
107107
REDIS_DB = 0 # ( REQUIRED ) Redis db
108108
REDIS_TLS = false # ( REQUIRED ) Enable or disable TLS for Redis
109109
REDIS_EXPIRATION_TIMEOUT = 7776000 # ( REQUIRED ) Expiration timeout (90 days ) for Redis entries
110-
REDIS_CONSUMER_BATCH_SIZE = 100 # ( REQUIRED ) The entries to read from each stream
110+
REDIS_CONSUMER_BATCH_SIZE = 200 # ( REQUIRED ) The entries to read from each stream
111111

112112
# ==============| IMAP CONNECTION CONFIG |============= #
113113
IMAP_FETCH_BODY = true # Enable or disable fetching Email bodies

backend/.env.dev

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ REDIS_MAXMEMORY = 1gb # ( REQUIRED ) Max memory used by redis, adjust it dep
4242
REDIS_DB = 0 # ( REQUIRED ) Redis db
4343
REDIS_TLS = false # ( REQUIRED ) Enable or disable TLS for Redis
4444
REDIS_EXPIRATION_TIMEOUT = 7776000 # ( REQUIRED ) Expiration timeout (90 days ) for Redis entries
45-
REDIS_CONSUMER_BATCH_SIZE = 100 # ( REQUIRED ) The entries to read from each stream
45+
REDIS_CONSUMER_BATCH_SIZE = 200 # ( REQUIRED ) The entries to read from each stream
4646

4747

4848
# ==============| API - REDIS CHANNELS, STREAMS |============= #
@@ -52,7 +52,7 @@ REDIS_SIGNATURE_STREAM_CONSUMER_GROUP = 'email-signature-consumer-group'
5252
REDIS_CLEANING_STREAM_CONSUMER_GROUP = 'email-verification-consumer-group' # consumer group for cleaning worker
5353
REDIS_EXTRACTING_STREAM_CONSUMER_GROUP = 'email-messages-consumer-group' # Consumer group for extracting worker
5454
REDIS_EMAIL_SIGNATURE_CONSUMER_BATCH_SIZE = 500
55-
REDIS_EMAIL_VERIFICATION_CONSUMER_BATCH_SIZE = 500
55+
REDIS_EMAIL_VERIFICATION_CONSUMER_BATCH_SIZE = 1000
5656

5757

5858
# ==============| API - OAUTH CONFIG |============= #
@@ -111,14 +111,14 @@ REACHER_RATE_LIMITER_INTERVAL = 60000 # 1 minute
111111
# - EnrichLayer: https://enrichlayer.com/docs/pc/#enrich-layer-overview
112112
#
113113
THEDIG_URL = http://127.0.0.1:8083/thedig/
114-
THEDIG_API_KEY = _
114+
THEDIG_API_KEY = test-api-key
115115

116116
VOILANORBERT_URL = http://127.0.0.1:8083/voilanorbert/2018-01-08/
117117
VOILANORBERT_USERNAME = any_string
118118
VOILANORBERT_API_KEY = test-api-key
119119

120-
ENRICH_LAYER_URL = https://enrichlayer.com/
121-
ENRICH_LAYER_API_KEY = _
120+
ENRICH_LAYER_URL = http://127.0.0.1:8083/enrichlayer/
121+
ENRICH_LAYER_API_KEY = test-api-key
122122

123123

124124
# ==============| THIRD-PARTY - IMAP EMAIL FETCHING SERVICE |============= #

0 commit comments

Comments
 (0)