In 2 times, since there is no more request data.
-1- create a record in the db and dispatch the job with an id of this record
-2- at the end of the job, update this record with the data received
My app uses a third-party CRM called Active Campaign. The integration is via API and I run it synchronously. The reason I run it this way is that oftentimes I need something from the response. An example would be adding someone new to the CRM that just signed up in the app, the response is the Contact ID which I then save on the user db record. Other times I am adding info to their profile in the CRM that may trigger an automated email or something.
My issue is that sometimes the Active Campaign API returns a 503. I have talked to their techs and they recommended moving the integration to a Queue. while I know how to do this, it is not obvious to me how to get and use the response from the API when I am calling it from a queue job.
Any thoughts on how to architect this so that I can use the response? TIA
Please or to participate in this conversation.