Prevent campaign details being edited during send (#620)

This commit is contained in:
Chris Anderson 2025-01-25 17:58:53 -06:00 committed by GitHub
parent c24e37cb01
commit 1527e01650
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -24,7 +24,7 @@ export default class RedisQueueProvider implements QueueProvider {
constructor({ concurrency, ...config }: RedisQueueConfig, queue: Queue) {
this.queue = queue
this.concurrency = concurrency
this.concurrency = concurrency ?? 10
this.redis = DefaultRedis(config, {
maxRetriesPerRequest: null,
})

View file

@ -30,6 +30,8 @@ export default function CampaignOverview() {
)?.reduce((prev, curr) => prev ? [prev, ', ', curr] : curr, '') ?? '–'
}
const canEdit = campaign.type === 'trigger' || campaign.state === 'draft' || campaign.state === 'aborted'
const extra = campaign.channel === 'text'
? '"phone": "+12345678900",'
: campaign.channel === 'push'
@ -57,7 +59,7 @@ export default function CampaignOverview() {
title={t('details')}
size="h3"
actions={
<Button
canEdit && <Button
size="small"
variant="secondary"
onClick={() => setIsEditOpen(true)}

View file

@ -18,7 +18,7 @@ Find below a list of all environment variables that can be set at launch to conf
| DB_DATABASE | string | true |
### Queue
| key | type | required |
| key | type | required | notes
|--|--|--|
| QUEUE_DRIVER | 'sqs' or 'redis' or 'memory' | true |
| AWS_SQS_QUEUE_URL | string | If driver is SQS |
@ -28,6 +28,7 @@ Find below a list of all environment variables that can be set at launch to conf
| REDIS_HOST | string | If driver is Redis |
| REDIS_PORT | string | If driver is Redis |
| REDIS_TLS | boolean | false |
| REDIS_CONCURRENCY | number | false | number of concurrent jobs to run
### Redis