+ Start a Discussion
STar14STar14 

Execute method fails to implement in queueable apex

I have written the following queuable class :


public class LeadTriggerQueueable implements Queueable{
   list<Rejected_Hold_List__c> lstRejectedLead = new list<Rejected_Hold_List__c>();
          public LeadTriggerQueueable(list<Rejected_Hold_List__c> lstRejectedLead){
                 this.lstRejectedLead = lstRejectedLead;
                 system.debug('####lstRejectedLeadConstructor '+lstRejectedLead);
             }
    
    //Method to create insert records for an sobject
     public void execute(QueueableContext context) {
         system.debug('####Inside execute');
          insert lstRejectedLead;
          system.debug('####lstRejectedLeadExecute '+lstRejectedLead);
     }
 }


But my execute method fails to run. I am calling this class from before insert trigger. I am not sure if i am missing something in here. Can someone point in right direction?
STar14STar14
I am running this queueable apex in my developer org. Can this be the reason for non execution?