mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-08-28 11:46:02 +08:00
Prevent campaign details being edited during send (#620)
This commit is contained in:
parent
c24e37cb01
commit
1527e01650
3 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||
})
|
||||
|
|
|
@ -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)}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue