mhenrixon/sidekiq-unique-jobs

View on GitHub
doc/SidekiqUniqueJobs/LockArgs.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: SidekiqUniqueJobs::LockArgs
  
    &mdash; Documentation by YARD 0.9.26
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" />

<script type="text/javascript">
  pathId = "SidekiqUniqueJobs::LockArgs";
  relpath = '../';
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="../class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../_index.html">Index (L)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span>
     &raquo; 
    <span class="title">LockArgs</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><h1>Class: SidekiqUniqueJobs::LockArgs
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">SidekiqUniqueJobs::LockArgs</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  <dl>
      <dt>Includes:</dt>
      <dd><span class='object_link'><a href="JSON.html" title="SidekiqUniqueJobs::JSON (module)">JSON</a></span>, <span class='object_link'><a href="Logging.html" title="SidekiqUniqueJobs::Logging (module)">Logging</a></span>, <span class='object_link'><a href="SidekiqWorkerMethods.html" title="SidekiqUniqueJobs::SidekiqWorkerMethods (module)">SidekiqWorkerMethods</a></span></dd>
  </dl>
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/sidekiq_unique_jobs/lock_args.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Handles uniqueness of sidekiq arguments</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Author:</p>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'><p>Mikael Henriksson <a href="mailto:mikael@mhenrixon.com">mikael@mhenrixon.com</a></p>
</div>
      
    </li>
  
</ul>

</div>



  <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#args-instance_method" title="#args (instance method)">#<strong>args</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute args.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#item-instance_method" title="#item (instance method)">#<strong>item</strong>  &#x21d2; Hash </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The sidekiq job hash.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Class Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#call-class_method" title="call (class method)">.<strong>call</strong>(item)  &#x21d2; String </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Convenience method for returning a digest.</p>
</div></span>
  
</li>

      
    </ul>
  
    <h2>
      Instance Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#after_unlock_hook-instance_method" title="#after_unlock_hook (instance method)">#<strong>after_unlock_hook</strong>  &#x21d2; Proc </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#after_unlock_hook-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#after_unlock_hook (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The hook to call after a successful unlock.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#build_message-instance_method" title="#build_message (instance method)">#<strong>build_message</strong>(message_or_exception, item = nil)  &#x21d2; String </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#build_message-instance_method" title="SidekiqUniqueJobs::Logging#build_message (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Build a log message.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#default_lock_args_method-instance_method" title="#default_lock_args_method (instance method)">#<strong>default_lock_args_method</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The global worker options defined in Sidekiq directly.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#default_worker_options-instance_method" title="#default_worker_options (instance method)">#<strong>default_worker_options</strong>  &#x21d2; Hash&lt;String, Object&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The globally default worker options configured from Sidekiq.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#filter_by_proc-instance_method" title="#filter_by_proc (instance method)">#<strong>filter_by_proc</strong>(args)  &#x21d2; Array </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Filters unique arguments by proc configured in the sidekiq worker.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#filter_by_symbol-instance_method" title="#filter_by_symbol (instance method)">#<strong>filter_by_symbol</strong>(args)  &#x21d2; Array </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Filters unique arguments by method configured in the sidekiq worker.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#filtered_args-instance_method" title="#filtered_args (instance method)">#<strong>filtered_args</strong>  &#x21d2; Array </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Filters unique arguments by proc or symbol.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(item)  &#x21d2; LockArgs </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>A new instance of LockArgs.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#lock_args-instance_method" title="#lock_args (instance method)">#<strong>lock_args</strong>  &#x21d2; Array </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The unique arguments to use for creating a lock.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#lock_args_disabled%3F-instance_method" title="#lock_args_disabled? (instance method)">#<strong>lock_args_disabled?</strong>  &#x21d2; true, false </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Checks if the worker class has disabled lock_args.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#lock_args_enabled%3F-instance_method" title="#lock_args_enabled? (instance method)">#<strong>lock_args_enabled?</strong>  &#x21d2; true, false </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Checks if the worker class has enabled lock_args.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#lock_args_method-instance_method" title="#lock_args_method (instance method)">#<strong>lock_args_method</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The method to use for filtering unique arguments.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#lock_args_method_valid%3F-instance_method" title="#lock_args_method_valid? (instance method)">#<strong>lock_args_method_valid?</strong>  &#x21d2; true, false </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Validate that the lock_args_method is acceptable.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_debug-instance_method" title="#log_debug (instance method)">#<strong>log_debug</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#log_debug-instance_method" title="SidekiqUniqueJobs::Logging#log_debug (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Logs a message at debug level.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_error-instance_method" title="#log_error (instance method)">#<strong>log_error</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#log_error-instance_method" title="SidekiqUniqueJobs::Logging#log_error (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Logs a message at error level.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_fatal-instance_method" title="#log_fatal (instance method)">#<strong>log_fatal</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#log_fatal-instance_method" title="SidekiqUniqueJobs::Logging#log_fatal (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Logs a message at fatal level.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_info-instance_method" title="#log_info (instance method)">#<strong>log_info</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#log_info-instance_method" title="SidekiqUniqueJobs::Logging#log_info (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Logs a message at info level.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_warn-instance_method" title="#log_warn (instance method)">#<strong>log_warn</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#log_warn-instance_method" title="SidekiqUniqueJobs::Logging#log_warn (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Logs a message at warn level.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong>  &#x21d2; Logger </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#logger-instance_method" title="SidekiqUniqueJobs::Logging#logger (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>A convenience method for using the configured gem logger.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#logging_context-instance_method" title="#logging_context (instance method)">#<strong>logging_context</strong>  &#x21d2; Hash </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#logging_context-instance_method" title="SidekiqUniqueJobs::Logging#logging_context (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Setup some variables to add to each log line.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#sidekiq_worker_class%3F-instance_method" title="#sidekiq_worker_class? (instance method)">#<strong>sidekiq_worker_class?</strong>  &#x21d2; true, false </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#sidekiq_worker_class%3F-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#sidekiq_worker_class? (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Tests that the.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#with_configured_loggers_context-instance_method" title="#with_configured_loggers_context (instance method)">#<strong>with_configured_loggers_context</strong> { ... } &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#with_configured_loggers_context-instance_method" title="SidekiqUniqueJobs::Logging#with_configured_loggers_context (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Attempt to setup context aware logging for the given logger.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#with_logging_context-instance_method" title="#with_logging_context (instance method)">#<strong>with_logging_context</strong>  &#x21d2; void </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="Logging.html#with_logging_context-instance_method" title="SidekiqUniqueJobs::Logging#with_logging_context (method)">Logging</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Wraps the middleware logic with context aware logging.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worker_class-instance_method" title="#worker_class (instance method)">#<strong>worker_class</strong>  &#x21d2; Sidekiq::Worker </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_class-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_class (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The Sidekiq::Worker implementation.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worker_class_constantize-instance_method" title="#worker_class_constantize (instance method)">#<strong>worker_class_constantize</strong>(klazz = @worker_class)  &#x21d2; Sidekiq::Worker </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_class_constantize-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_class_constantize (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Attempt to constantize a string worker_class argument, always failing back to the original argument when the constant can&#39;t be found.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worker_method_defined%3F-instance_method" title="#worker_method_defined? (instance method)">#<strong>worker_method_defined?</strong>(method_sym)  &#x21d2; true, false </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_method_defined%3F-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_method_defined? (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Avoids duplicating worker_class.respond_to? in multiple places.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worker_options-instance_method" title="#worker_options (instance method)">#<strong>worker_options</strong>  &#x21d2; Hash </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_options-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_options (method)">SidekiqWorkerMethods</a></span>
    </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Wraps #get_sidekiq_options to always work with a hash.</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  <div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    #<strong>initialize</strong>(item)  &#x21d2; <tt><span class='object_link'><a href="" title="SidekiqUniqueJobs::LockArgs (class)">LockArgs</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns a new instance of LockArgs.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>item</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a Sidekiq job hash</p>
</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30
31
32</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 28</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span>
  <span class='ivar'>@item</span>         <span class='op'>=</span> <span class='id identifier rubyid_item'>item</span>
  <span class='ivar'>@worker_class</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#CLASS-constant" title="SidekiqUniqueJobs::CLASS (constant)">CLASS</a></span></span><span class='rbracket'>]</span>
  <span class='ivar'>@args</span>         <span class='op'>=</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#ARGS-constant" title="SidekiqUniqueJobs::ARGS (constant)">ARGS</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id=""></span>
      <div class="method_details first">
  <h3 class="signature first" id="args-instance_method">
  
    #<strong>args</strong>  &#x21d2; <tt>Object</tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute args.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 25</span>

<span class='kw'>def</span> <span class='id identifier rubyid_args'>args</span>
  <span class='ivar'>@args</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id=""></span>
      <div class="method_details ">
  <h3 class="signature " id="item-instance_method">
  
    #<strong>item</strong>  &#x21d2; <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The sidekiq job hash</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the Sidekiq job hash</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


21
22
23</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 21</span>

<span class='kw'>def</span> <span class='id identifier rubyid_item'>item</span>
  <span class='ivar'>@item</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="call-class_method">
  
    .<strong>call</strong>(item)  &#x21d2; <tt>String</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Convenience method for returning a digest</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>item</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a Sidekiq job hash</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a unique digest</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


15
16
17</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 15</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_lock_args'>lock_args</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="after_unlock_hook-instance_method">
  
    #<strong>after_unlock_hook</strong>  &#x21d2; <tt>Proc</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#after_unlock_hook-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#after_unlock_hook (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>The hook to call after a successful unlock</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Proc</tt>)</span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="build_message-instance_method">
  
    #<strong>build_message</strong>(message_or_exception, item = nil)  &#x21d2; <tt>String</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#build_message-instance_method" title="SidekiqUniqueJobs::Logging#build_message (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Build a log message</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>an entry to log</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>item</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the sidekiq job hash</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a complete log entry</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_lock_args_method-instance_method">
  
    #<strong>default_lock_args_method</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The global worker options defined in Sidekiq directly</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


108
109
110
111</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 108</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_lock_args_method'>default_lock_args_method</span>
  <span class='id identifier rubyid_default_worker_options'>default_worker_options</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#LOCK_ARGS_METHOD-constant" title="SidekiqUniqueJobs::LOCK_ARGS_METHOD (constant)">LOCK_ARGS_METHOD</a></span></span><span class='rbracket'>]</span> <span class='op'>||</span>
    <span class='id identifier rubyid_default_worker_options'>default_worker_options</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#UNIQUE_ARGS_METHOD-constant" title="SidekiqUniqueJobs::UNIQUE_ARGS_METHOD (constant)">UNIQUE_ARGS_METHOD</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_worker_options-instance_method">
  
    #<strong>default_worker_options</strong>  &#x21d2; <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span>&lt;String, Object&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The globally default worker options configured from Sidekiq</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span>&lt;String, Object&gt;</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


119
120
121</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 119</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_worker_options'>default_worker_options</span>
  <span class='ivar'>@default_worker_options</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../Sidekiq.html" title="Sidekiq (module)">Sidekiq</a></span></span><span class='period'>.</span><span class='id identifier rubyid_default_worker_options'>default_worker_options</span><span class='period'>.</span><span class='id identifier rubyid_stringify_keys'>stringify_keys</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="filter_by_proc-instance_method">
  
    #<strong>filter_by_proc</strong>(args)  &#x21d2; <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Filters unique arguments by proc configured in the sidekiq worker</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>args</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the arguments passed to the sidekiq worker</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>with the filtered arguments</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


80
81
82</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 80</span>

<span class='kw'>def</span> <span class='id identifier rubyid_filter_by_proc'>filter_by_proc</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_lock_args_method'>lock_args_method</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="filter_by_symbol-instance_method">
  
    #<strong>filter_by_symbol</strong>(args)  &#x21d2; <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Filters unique arguments by method configured in the sidekiq worker</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>args</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the arguments passed to the sidekiq worker</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>unfiltered unless <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_method_defined%3F-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_method_defined? (method)">SidekiqWorkerMethods#worker_method_defined?</a></span></p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>with the filtered arguments</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


88
89
90
91
92
93
94
95
96
97</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 88</span>

<span class='kw'>def</span> <span class='id identifier rubyid_filter_by_symbol'>filter_by_symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_args'>args</span> <span class='kw'>unless</span> <span class='id identifier rubyid_worker_method_defined?'>worker_method_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_lock_args_method'>lock_args_method</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_worker_class'>worker_class</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_lock_args_method'>lock_args_method</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>rescue</span> <span class='const'>ArgumentError</span>
  <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="InvalidUniqueArguments.html" title="SidekiqUniqueJobs::InvalidUniqueArguments (class)">InvalidUniqueArguments</a></span></span><span class='comma'>,</span>
        <span class='label'>given:</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span>
        <span class='label'>worker_class:</span> <span class='id identifier rubyid_worker_class'>worker_class</span><span class='comma'>,</span>
        <span class='label'>lock_args_method:</span> <span class='id identifier rubyid_lock_args_method'>lock_args_method</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="filtered_args-instance_method">
  
    #<strong>filtered_args</strong>  &#x21d2; <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Filters unique arguments by proc or symbol</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><span class='object_link'><a href="#filter_by_proc-instance_method" title="SidekiqUniqueJobs::LockArgs#filter_by_proc (method)">#filter_by_proc</a></span> when <span class='object_link'><a href="#lock_args_method-instance_method" title="SidekiqUniqueJobs::LockArgs#lock_args_method (method)">#lock_args_method</a></span> is a Proc</p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><span class='object_link'><a href="#filter_by_symbol-instance_method" title="SidekiqUniqueJobs::LockArgs#filter_by_symbol (method)">#filter_by_symbol</a></span> when <span class='object_link'><a href="#lock_args_method-instance_method" title="SidekiqUniqueJobs::LockArgs#lock_args_method (method)">#lock_args_method</a></span> is a Symbol</p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>args unfiltered when neither of the above</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


64
65
66
67
68
69
70
71
72
73
74
75</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 64</span>

<span class='kw'>def</span> <span class='id identifier rubyid_filtered_args'>filtered_args</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_args'>args</span> <span class='kw'>if</span> <span class='id identifier rubyid_lock_args_disabled?'>lock_args_disabled?</span>

  <span class='id identifier rubyid_json_args'>json_args</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Normalizer.html" title="SidekiqUniqueJobs::Normalizer (module)">Normalizer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_jsonify'><span class='object_link'><a href="Normalizer.html#jsonify-class_method" title="SidekiqUniqueJobs::Normalizer.jsonify (method)">jsonify</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>

  <span class='kw'>case</span> <span class='id identifier rubyid_lock_args_method'>lock_args_method</span>
  <span class='kw'>when</span> <span class='const'>Proc</span>
    <span class='id identifier rubyid_filter_by_proc'>filter_by_proc</span><span class='lparen'>(</span><span class='id identifier rubyid_json_args'>json_args</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='const'>Symbol</span>
    <span class='id identifier rubyid_filter_by_symbol'>filter_by_symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_json_args'>json_args</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_args-instance_method">
  
    #<strong>lock_args</strong>  &#x21d2; <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The unique arguments to use for creating a lock</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the arguments filters by the <span class='object_link'><a href="#filtered_args-instance_method" title="SidekiqUniqueJobs::LockArgs#filtered_args (method)">#filtered_args</a></span> method if <span class='object_link'><a href="#lock_args_enabled%3F-instance_method" title="SidekiqUniqueJobs::LockArgs#lock_args_enabled? (method)">#lock_args_enabled?</a></span></p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


36
37
38</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 36</span>

<span class='kw'>def</span> <span class='id identifier rubyid_lock_args'>lock_args</span>
  <span class='ivar'>@lock_args</span> <span class='op'>||=</span> <span class='id identifier rubyid_filtered_args'>filtered_args</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_args_disabled?-instance_method">
  
    #<strong>lock_args_disabled?</strong>  &#x21d2; <tt>true</tt>, <tt>false</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Checks if the worker class has disabled lock_args</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


56
57
58</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 56</span>

<span class='kw'>def</span> <span class='id identifier rubyid_lock_args_disabled?'>lock_args_disabled?</span>
  <span class='op'>!</span><span class='id identifier rubyid_lock_args_method'>lock_args_method</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_args_enabled?-instance_method">
  
    #<strong>lock_args_enabled?</strong>  &#x21d2; <tt>true</tt>, <tt>false</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Checks if the worker class has enabled lock_args</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44
45
46</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 42</span>

<span class='kw'>def</span> <span class='id identifier rubyid_lock_args_enabled?'>lock_args_enabled?</span>
  <span class='comment'># return false unless lock_args_method_valid?
</span>
  <span class='id identifier rubyid_lock_args_method'>lock_args_method</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_args_method-instance_method">
  
    #<strong>lock_args_method</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The method to use for filtering unique arguments</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


100
101
102
103
104
105</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 100</span>

<span class='kw'>def</span> <span class='id identifier rubyid_lock_args_method'>lock_args_method</span>
  <span class='ivar'>@lock_args_method</span> <span class='op'>||=</span> <span class='id identifier rubyid_worker_options'>worker_options</span><span class='period'>.</span><span class='id identifier rubyid_slice'>slice</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#LOCK_ARGS_METHOD-constant" title="SidekiqUniqueJobs::LOCK_ARGS_METHOD (constant)">LOCK_ARGS_METHOD</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html#UNIQUE_ARGS_METHOD-constant" title="SidekiqUniqueJobs::UNIQUE_ARGS_METHOD (constant)">UNIQUE_ARGS_METHOD</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
  <span class='ivar'>@lock_args_method</span> <span class='op'>||=</span> <span class='symbol'>:lock_args</span> <span class='kw'>if</span> <span class='id identifier rubyid_worker_method_defined?'>worker_method_defined?</span><span class='lparen'>(</span><span class='symbol'>:lock_args</span><span class='rparen'>)</span>
  <span class='ivar'>@lock_args_method</span> <span class='op'>||=</span> <span class='symbol'>:unique_args</span> <span class='kw'>if</span> <span class='id identifier rubyid_worker_method_defined?'>worker_method_defined?</span><span class='lparen'>(</span><span class='symbol'>:unique_args</span><span class='rparen'>)</span>
  <span class='ivar'>@lock_args_method</span> <span class='op'>||=</span> <span class='id identifier rubyid_default_lock_args_method'>default_lock_args_method</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_args_method_valid?-instance_method">
  
    #<strong>lock_args_method_valid?</strong>  &#x21d2; <tt>true</tt>, <tt>false</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Validate that the lock_args_method is acceptable</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


50
51
52</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/lock_args.rb', line 50</span>

<span class='kw'>def</span> <span class='id identifier rubyid_lock_args_method_valid?'>lock_args_method_valid?</span>
  <span class='lbracket'>[</span><span class='const'>NilClass</span><span class='comma'>,</span> <span class='const'>TrueClass</span><span class='comma'>,</span> <span class='const'>FalseClass</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_klass'>klass</span><span class='op'>|</span> <span class='id identifier rubyid_lock_args_method'>lock_args_method</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="log_debug-instance_method">
  
    #<strong>log_debug</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#log_debug-instance_method" title="SidekiqUniqueJobs::Logging#log_debug (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Logs a message at debug level</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the message or exception to log</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the message or exception to use for log message</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="log_error-instance_method">
  
    #<strong>log_error</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#log_error-instance_method" title="SidekiqUniqueJobs::Logging#log_error (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Logs a message at error level</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the message or exception to log</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the message or exception to use for log message</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="log_fatal-instance_method">
  
    #<strong>log_fatal</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#log_fatal-instance_method" title="SidekiqUniqueJobs::Logging#log_fatal (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Logs a message at fatal level</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the message or exception to log</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the message or exception to use for log message</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="log_info-instance_method">
  
    #<strong>log_info</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#log_info-instance_method" title="SidekiqUniqueJobs::Logging#log_info (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Logs a message at info level</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the message or exception to log</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the message or exception to use for log message</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="log_warn-instance_method">
  
    #<strong>log_warn</strong>(message_or_exception = nil, item = nil) {|String, Exception| ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#log_warn-instance_method" title="SidekiqUniqueJobs::Logging#log_warn (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Logs a message at warn level</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>message_or_exception</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>the message or exception to log</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Exception</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the message or exception to use for log message</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="logger-instance_method">
  
    #<strong>logger</strong>  &#x21d2; <tt>Logger</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#logger-instance_method" title="SidekiqUniqueJobs::Logging#logger (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>A convenience method for using the configured gem logger</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Logger</tt>)</span>
      
      
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li>SidekiqUniqueJobs#.logger</li>
    
  </ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="logging_context-instance_method">
  
    #<strong>logging_context</strong>  &#x21d2; <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#logging_context-instance_method" title="SidekiqUniqueJobs::Logging#logging_context (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Setup some variables to add to each log line</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the context to use for each log line</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt>NotImplementedError</tt>)</span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="sidekiq_worker_class?-instance_method">
  
    #<strong>sidekiq_worker_class?</strong>  &#x21d2; <tt>true</tt>, <tt>false</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#sidekiq_worker_class%3F-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#sidekiq_worker_class? (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Tests that the</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>if worker_class responds to get_sidekiq_options</p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>if worker_class does not respond to get_sidekiq_options</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="with_configured_loggers_context-instance_method">
  
    #<strong>with_configured_loggers_context</strong> { ... } &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#with_configured_loggers_context-instance_method" title="SidekiqUniqueJobs::Logging#with_configured_loggers_context (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Attempt to setup context aware logging for the given logger</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'></span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="with_logging_context-instance_method">
  
    #<strong>with_logging_context</strong>  &#x21d2; <tt>void</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="Logging.html#with_logging_context-instance_method" title="SidekiqUniqueJobs::Logging#with_logging_context (method)">Logging</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Wraps the middleware logic with context aware logging</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Yield Returns:</p>
<ul class="yieldreturn">
  
    <li>
      
      
        <span class='type'>(<tt>void</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>yield to the middleware instance</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="worker_class-instance_method">
  
    #<strong>worker_class</strong>  &#x21d2; <tt><span class='object_link'><a href="../Sidekiq/Worker.html" title="Sidekiq::Worker (module)">Sidekiq::Worker</a></span></tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_class-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_class (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>The Sidekiq::Worker implementation</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Sidekiq/Worker.html" title="Sidekiq::Worker (module)">Sidekiq::Worker</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="worker_class_constantize-instance_method">
  
    #<strong>worker_class_constantize</strong>(klazz = @worker_class)  &#x21d2; <tt><span class='object_link'><a href="../Sidekiq/Worker.html" title="Sidekiq::Worker (module)">Sidekiq::Worker</a></span></tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_class_constantize-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_class_constantize (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Attempt to constantize a string worker_class argument, always
failing back to the original argument when the constant can&#39;t be found</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Sidekiq/Worker.html" title="Sidekiq::Worker (module)">Sidekiq::Worker</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="worker_method_defined?-instance_method">
  
    #<strong>worker_method_defined?</strong>(method_sym)  &#x21d2; <tt>true</tt>, <tt>false</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_method_defined%3F-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_method_defined? (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Avoids duplicating worker_class.respond_to? in multiple places</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
    </li>
  
</ul>

</div>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="worker_options-instance_method">
  
    #<strong>worker_options</strong>  &#x21d2; <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="SidekiqWorkerMethods.html#worker_options-instance_method" title="SidekiqUniqueJobs::SidekiqWorkerMethods#worker_options (method)">SidekiqWorkerMethods</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Wraps #get_sidekiq_options to always work with a hash</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>of the worker class sidekiq options</p>
</div>
      
    </li>
  
</ul>

</div>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Mon Sep 27 15:29:07 2021 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.26 (ruby-3.0.2).
</div>

    </div>
  </body>
</html>