mhenrixon/sidekiq-unique-jobs

View on GitHub
doc/SidekiqUniqueJobs/Middleware/Server.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::Middleware::Server
  
    &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::Middleware::Server";
  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 (S)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Middleware.html" title="SidekiqUniqueJobs::Middleware (module)">Middleware</a></span></span>
     &raquo; 
    <span class="title">Server</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::Middleware::Server
  
  
  
</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::Middleware::Server</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

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

  

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

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>The unique sidekiq middleware for the server processor</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="#item-instance_method" title="#item (instance method)">#<strong>item</strong>  &#x21d2; Hash </a>
    

    
  </span>
  
    <span class="note title not_defined_here">
      included
      from <span class='object_link'><a href="../Middleware.html#item-instance_method" title="SidekiqUniqueJobs::Middleware#item (method)">SidekiqUniqueJobs::Middleware</a></span>
    </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>
      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="#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="#call-instance_method" title="#call (instance method)">#<strong>call</strong> { ... } &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Runs the server middleware (used from Sidekiq::Processor#process).</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>Returns the corresponding class for the lock_type.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>A new lock for this Sidekiq Job.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>The type of lock for this worker.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>A convenience method for using the configured locks.</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, String </a>
    

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

  
    <span class="summary_desc"><div class='inline'><p>Provides a logging context for Sidekiq Middlewares.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>The default options with any matching keys overridden from worker options.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>Check if unique has been disabled.</p>
</div></span>
  
</li>

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

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

  
    <span class="summary_desc"><div class='inline'><p>Check if unique has been enabled.</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>

      
    </ul>
  


  
  
  
  
  
  
  
  
  
  
  <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="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>
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../Middleware.html#item-instance_method" title="SidekiqUniqueJobs::Middleware#item (method)">SidekiqUniqueJobs::Middleware</a></span>
    </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>
</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="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="call-instance_method">
  
    #<strong>call</strong> { ... } &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Runs the server middleware (used from Sidekiq::Processor#process)</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'></span>
      
      
      
        
        <div class='inline'><p>when uniqueness is disabled</p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'></span>
      
      
      
        
        <div class='inline'><p>when owning the lock</p>
</div>
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="../Middleware.html#call-instance_method" title="SidekiqUniqueJobs::Middleware#call (method)">SidekiqUniqueJobs::Middleware#call</a></span></li>
    
      <li><a href="https://github.com/mperham/sidekiq/wiki/Job-Format" target="_parent" title="https://github.com/mperham/sidekiq/wiki/Job-Format">https://github.com/mperham/sidekiq/wiki/Job-Format</a></li>
    
      <li><a href="https://github.com/mperham/sidekiq/wiki/Middleware" target="_parent" title="https://github.com/mperham/sidekiq/wiki/Middleware">https://github.com/mperham/sidekiq/wiki/Middleware</a></li>
    
  </ul>

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


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

<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_lock_instance'>lock_instance</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="lock_class-instance_method">
  
    #<strong>lock_class</strong>  &#x21d2; <tt>Class</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#lock_class-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#lock_class (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the corresponding class for the lock_type</p>


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

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

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#lock_instance-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#lock_instance (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>A new lock for this Sidekiq Job</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="../Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">Lock::BaseLock</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>an instance of a lock implementation</p>
</div>
      
    </li>
  
</ul>

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

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#lock_type-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#lock_type (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>The type of lock for this worker</p>


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

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

  

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


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

</div>
</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>, <tt>String</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../Logging/Middleware.html#logging_context-instance_method" title="SidekiqUniqueJobs::Logging::Middleware#logging_context (method)">Logging::Middleware</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Provides a logging context for Sidekiq Middlewares</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>when logger responds to <code>:with_context</code></p>
</div>
      
    </li>
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>when logger does not responds to <code>:with_context</code></p>
</div>
      
    </li>
  
</ul>

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

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#options-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#options (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>The default options with any matching keys overridden from worker options</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>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="unique_disabled?-instance_method">
  
    #<strong>unique_disabled?</strong>  &#x21d2; <tt>Boolean</tt> 
  

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#unique_disabled%3F-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#unique_disabled? (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Check if unique has been disabled</p>


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

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

  

  
    <span class="not_defined_here">
      Originally defined in module
        <span class='object_link'><a href="../OptionsWithFallback.html#unique_enabled%3F-instance_method" title="SidekiqUniqueJobs::OptionsWithFallback#unique_enabled? (method)">OptionsWithFallback</a></span>
    </span>
  
</h3><div class="docstring">
  <div class="discussion">
    <p>Check if unique has been enabled</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>
      
      
      
        &mdash;
        <div class='inline'><p>indicate if the gem has been enabled</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>

</div>

      <div id="footer">
  Generated on Mon Sep 27 15:29:09 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>