function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

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?
I am running this queueable apex in my developer org. Can this be the reason for non execution?