hunk.code_window:     );
       await this.workflowQueueService.addToQueue(job._id, job, delay);
     }
     public static toMilliseconds(amount: number, unit: DigestUnitEnum): number {
       let delay = 1000 * amount;
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:     if (delay) {
         await this.createExecutionDetails.execute(
           CreateExecutionDetailsCommand.create({
             ...CreateExecutionDetailsCommand.getDetailsFromJob(job),
             detail: DetailEnum.STEP_DELAYED,
             source: ExecutionDetailsSourceEnum.INTERNAL,
             status: ExecutionDetailsStatusEnum.PENDING,
             isTest: false,
             isRetry: false,
             raw: JSON.stringify({ delay }),
           })
         );
       }
  
hunk.file_path: apps/api/src/app/events/usecases/add-job/add-job.usecase.ts
hunk.type: add
file: import { ChannelTypeEnum } from '@novu/shared';
  import { SendgridEmailProvider } from '@novu/sendgrid';
  import { BaseHandler } from './base.handler';
  
  export class SendgridHandler extends BaseHandler {
    constructor() {
      super('sendgrid', ChannelTypeEnum.EMAIL);
    }
  
    buildProvider(credentials, from?: string) {
      const config: { apiKey: string; from: string; senderName: string } = {
        apiKey: credentials.apiKey,
        from,
        senderName: credentials.senderName,
      };
  
      this.provider = new SendgridEmailProvider(config);
    }
  }
  