File tree Expand file tree Collapse file tree 4 files changed +21
-11
lines changed
Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,11 @@ export function throwPostmanStepError({
9292 }
9393 case 'RATE-LIMITED' :
9494 // this will be auto-retried later on
95- throw new StepError (
96- 'Rate limit exceeded' ,
97- 'Too many emails are being sent. Please wait for a while before retrying.' ,
98- position ,
99- appName ,
100- error ,
101- )
95+ throw new RetriableError ( {
96+ error : error . details ,
97+ delayInMs : 'default' ,
98+ delayType : 'queue' ,
99+ } )
102100 case 'INVALID-ATTACHMENT' :
103101 throw new StepError (
104102 'Unsupported attachment file type' ,
Original file line number Diff line number Diff line change 11import { IApp } from '@plumber/types'
22
3- import { getGenericAppQueue } from '@/queues/helpers/get-generic-app-queue'
4-
53import actions from './actions'
4+ import queue from './queue'
65
76const app : IApp = {
87 name : 'Email by Postman' ,
@@ -21,7 +20,7 @@ const app: IApp = {
2120 url : 'https://demo.arcade.software/VppMAbGKfFXFEsKxnKiw?embed&show_copy_link=true' ,
2221 title : 'Setting up Email by Postman' ,
2322 } ,
24- queue : getGenericAppQueue ( 'POSTMAN_EMAIL' ) ,
23+ queue,
2524 category : 'communication' ,
2625}
2726
Original file line number Diff line number Diff line change 1+ import type { IAppQueue } from '@plumber/types'
2+
3+ import appConfig from '@/config/app'
4+
5+ const queueSettings = {
6+ queueRateLimit : {
7+ duration : 1000 ,
8+ max : appConfig . postman . rateLimit ,
9+ } ,
10+ isQueueDelayable : true ,
11+ } satisfies IAppQueue
12+
13+ export default queueSettings
Original file line number Diff line number Diff line change 11export const QUEUE_CONCURRENCY = {
2- POSTMAN_EMAIL : 3 ,
2+ // POSTMAN_EMAIL: 3, // overridden in app config
33 SLACK : 3 ,
44 TELEGRAM : 3 ,
55}
You can’t perform that action at this time.
0 commit comments