class AzuCLI::Generate::Job

Overview

Job generator that creates JoobQ::Job structs Generates background job classes with modern JoobQ API support

Defined in:

azu_cli/generators/job.cr

Constant Summary

OUTPUT_DIR = "./src/jobs"

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, parameters : Hash(String, String) = {} of String => String, queue : String = "default", retries : Int32 = 3, expires : String = "1.days") #

[View source]

Instance Method Detail

def ____collect_files(____files) #
Description copied from class Teeplate::FileTree

:nodoc:


[View source]
def __ecr0(____io) #

[View source]
def constructor_params : String #

Get constructor parameters


[View source]
def crystal_type(param_type : String) : String #

Get Crystal type for parameter


[View source]
def error_handling_example : String #

Get error handling example


[View source]
def expiration_seconds : String #

Get expiration time in seconds


[View source]
def expires : String #

[View source]
def expires=(expires : String) #

[View source]
def has_parameters? : Bool #

Check if job has parameters


[View source]
def job_struct_name : String #

Convert name to job struct name


[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def parameters : Hash(String, String) #

[View source]
def parameters=(parameters : Hash(String, String)) #

[View source]
def perform_method_body : String #

Get perform method body based on job type


[View source]
def queue : String #

[View source]
def queue=(queue : String) #

[View source]
def retries : Int32 #

[View source]
def retries=(retries : Int32) #

[View source]
def snake_case_name : String #

[View source]
def snake_case_name=(snake_case_name : String) #

[View source]