class
AzuCLI::Generate::Job
- AzuCLI::Generate::Job
- Teeplate::FileTree
- Reference
- Object
Overview
Job generator that creates JoobQ::Job structs Generates background job classes with modern JoobQ API support
Defined in:
azu_cli/generators/job.crConstant Summary
-
OUTPUT_DIR =
"./src/jobs"
Constructors
Instance Method Summary
-
#____collect_files(____files)
:nodoc:
- #__ecr0(____io)
-
#constructor_params : String
Get constructor parameters
-
#crystal_type(param_type : String) : String
Get Crystal type for parameter
-
#error_handling_example : String
Get error handling example
-
#expiration_seconds : String
Get expiration time in seconds
- #expires : String
- #expires=(expires : String)
-
#has_parameters? : Bool
Check if job has parameters
-
#job_struct_name : String
Convert name to job struct name
- #name : String
- #name=(name : String)
- #parameters : Hash(String, String)
- #parameters=(parameters : Hash(String, String))
-
#perform_method_body : String
Get perform method body based on job type
- #queue : String
- #queue=(queue : String)
- #retries : Int32
- #retries=(retries : Int32)
- #snake_case_name : String
- #snake_case_name=(snake_case_name : String)
Constructor Detail
def self.new(name : String, parameters : Hash(String, String) = {} of String => String, queue : String = "default", retries : Int32 = 3, expires : String = "1.days")
#