a8n: Set an upper time limit on CampaignPlan execution
Created by: mrnugget
Currently a CampaignPlan
and its CampaignJob
s can run indefinitely in case the user specifies wait = false
in the previewCampaignPlan
mutation:
But we probably don't want single jobs to run for more than, let's say, 2 minutes.
So when we run a single CampaignJob
we want to use a timeout context:
If a CampaignJob runs into a timeout, we need to persist that error on the CampaignJob.
If the user specified wait = true
a request timeout kicks in after 60s. We need to confirm that this timeout propagates down to the jobs and also results in an error.
We also want to make sure that we use a correct timeout when talking to the replacer
service in the comby
CampaignType
:
And maybe we should use a different fetchTimeout
when talking to replacer, depending on whether or not the 500ms
default value makes sense or not: