Closed stejskalleos closed 4 years ago
Issue Skipping engine hook (uninitialized constant Host::JobInvocation) during plugin initialization.
How to reproduce the issue
binding.pry
Host::JobInvocation.include ForemanLeapp::JobInvocationExtensions
pry
[1] pry(#<#<Class:0x000000000a5940c0>>)> Host::JobInvocation => JobInvocation(id: integer, targeting_id: integer, job_category: string, task_id: uuid, task_group_id: integer, triggering_id: integer, description: string, concurrency_level: integer, time_span: integer, execution_timeout_interval: integer, password: string, key_passphrase: string, remote_execution_feature_id: integer, sudo_password: string)
[2] pry(#<#>)> Host::JobInvocation NameError: uninitialized constant Host::JobInvocation from /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in `block in load_missing_constant' [3] pry(#<#>)>
**Fix** Hook only `JobInvocation` instead of `Host::JobInvocation`
Issue Skipping engine hook (uninitialized constant Host::JobInvocation) during plugin initialization.
How to reproduce the issue
binding.pry
beforeHost::JobInvocation.include ForemanLeapp::JobInvocationExtensions
pry
:[2] pry(#<#>)> Host::JobInvocation
NameError: uninitialized constant Host::JobInvocation
from /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in `block in load_missing_constant'
[3] pry(#<#>)>