{{#var jobName = string(entity.name).removeSuffix('job').suffix('Job').pascalCase().toString()}}
{{#var jobFileName = string(entity.name).removeSuffix('job').suffix('Job').snakeCase().removeExtension().ext('.ts').toString()}}
{{{
  exports({ to: app.makePath('app/jobs', entity.path, jobFileName) })
}}}
import { Job } from '@rlanz/bull-queue'

interface {{ jobName }}Payload {}

export default class {{ jobName }} extends Job {
  // This is the path to the file that is used to create the job
  static get $$filepath() {
    return import.meta.url
  }

  /**
   * Base Entry point
   */
  async handle(payload: {{ jobName }}Payload) {}

  /**
   * This is an optional method that gets called when the retries has exceeded and is marked failed.
   */
  async rescue(payload: {{ jobName }}Payload) {}
}
