You need to sign in to do that
Don't have an account?
ahmed kishk 9
Queueable job has been created but I can't find it Apex Jobs view or by querying AsyncApexJob object
Hello All,
I have ocausinally Callout time out while calling a webservice. I have created a queuable job to retry my request whenever exception occurs. Below is my exception handling and the code that I used to create Queueable job:
First error: Callout Exception has been occured while calling CQC API. retry job has been created with Id:7078E00000P2XlE
However I could not find the job with specified Id 7078E00000P2XlE in Apex Jobs view or by querying AsyncApexJob object.
I have tested my code in Anonymous Window and it got executed successfuly and the Queueable Job has been created sucessfully. So what I have missed in my code?
Thanks,
Ahmed Kishk
I have ocausinally Callout time out while calling a webservice. I have created a queuable job to retry my request whenever exception occurs. Below is my exception handling and the code that I used to create Queueable job:
try{ // APEX Call out }catch(System.CalloutException e){ CQCLocationImporterQueueable retryJob = new CQCLocationImporterQueueable(pageUri); ID jobID = System.enqueueJob(retryJob); throw new applicationException('Callout Exception has been occured while calling CQC API. retry job has been created with Id:' + jobID); }catch(applicationException e){ CQCLocationImporterQueueable retryJob = new CQCLocationImporterQueueable(pageUri); ID jobID = System.enqueueJob(retryJob); throw new applicationException('Callout Exception has been occured while calling CQC API. retry job has been created with Id:' + jobID); }My BatchJob has failed with Status Detail:
First error: Callout Exception has been occured while calling CQC API. retry job has been created with Id:7078E00000P2XlE
However I could not find the job with specified Id 7078E00000P2XlE in Apex Jobs view or by querying AsyncApexJob object.
SELECT Id, Status, NumberOfErrors FROM AsyncApexJob where Id = '7078E00000P2XlE'
I have tested my code in Anonymous Window and it got executed successfuly and the Queueable Job has been created sucessfully. So what I have missed in my code?
Thanks,
Ahmed Kishk
All Answers