mhenrixon/sidekiq-unique-jobs

View on GitHub
doc/SidekiqUniqueJobs/Config.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::Config
  
    &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::Config";
  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 (C)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span>
     &raquo; 
    <span class="title">Config</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::Config
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName"><span class='object_link'><a href="../SidekiqUniqueJobs.html#ThreadSafeConfig-constant" title="SidekiqUniqueJobs::ThreadSafeConfig (constant)">ThreadSafeConfig</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">SidekiqUniqueJobs::Config</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

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

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Shared class for dealing with gem configuration</p>

<p>rubocop:disable Metrics/ClassLength</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Author:</p>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'><p>Mauro Berlanda <a href="mailto:mauro.berlanda@gmail.com">mauro.berlanda@gmail.com</a></p>
</div>
      
    </li>
  
</ul>

</div>
  
    <h2>
      Constant Summary
      <small><a href="#" class="constants_summary_toggle">collapse</a></small>
    </h2>

    <dl class="constants">
      
        <dt id="LOCKS_WHILE_ENQUEUED-constant" class="">LOCKS_WHILE_ENQUEUED =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available queued locks.</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;Symbol, <span class='object_link'><a href="Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">SidekiqUniqueJobs::Lock::BaseLock</a></span>] all available queued <span class='object_link'><a href="../SidekiqUniqueJobs.html#locks-class_method" title="SidekiqUniqueJobs.locks (method)">locks</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available queued locks</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>until_executing:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuting.html" title="SidekiqUniqueJobs::Lock::UntilExecuting (class)">UntilExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>while_enqueued:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuting.html" title="SidekiqUniqueJobs::Lock::UntilExecuting (class)">UntilExecuting</a></span></span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="LOCKS_FROM_PUSH_TO_PROCESSED-constant" class="">LOCKS_FROM_PUSH_TO_PROCESSED =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available fulltime locks.</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;Symbol, <span class='object_link'><a href="Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">SidekiqUniqueJobs::Lock::BaseLock</a></span>] all available fulltime <span class='object_link'><a href="../SidekiqUniqueJobs.html#locks-class_method" title="SidekiqUniqueJobs.locks (method)">locks</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available fulltime locks</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>until_completed:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuted.html" title="SidekiqUniqueJobs::Lock::UntilExecuted (class)">UntilExecuted</a></span></span><span class='comma'>,</span>
  <span class='label'>until_executed:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuted.html" title="SidekiqUniqueJobs::Lock::UntilExecuted (class)">UntilExecuted</a></span></span><span class='comma'>,</span>
  <span class='label'>until_performed:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuted.html" title="SidekiqUniqueJobs::Lock::UntilExecuted (class)">UntilExecuted</a></span></span><span class='comma'>,</span>
  <span class='label'>until_processed:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuted.html" title="SidekiqUniqueJobs::Lock::UntilExecuted (class)">UntilExecuted</a></span></span><span class='comma'>,</span>
  <span class='label'>until_and_while_executing:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilAndWhileExecuting.html" title="SidekiqUniqueJobs::Lock::UntilAndWhileExecuting (class)">UntilAndWhileExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>until_successfully_completed:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExecuted.html" title="SidekiqUniqueJobs::Lock::UntilExecuted (class)">UntilExecuted</a></span></span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="LOCKS_WITHOUT_UNLOCK-constant" class="">LOCKS_WITHOUT_UNLOCK =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available locks without unlock.</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;Symbol, <span class='object_link'><a href="Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">SidekiqUniqueJobs::Lock::BaseLock</a></span>] all available <span class='object_link'><a href="../SidekiqUniqueJobs.html#locks-class_method" title="SidekiqUniqueJobs.locks (method)">locks</a></span> without unlock</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available locks without unlock</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>until_expired:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/UntilExpired.html" title="SidekiqUniqueJobs::Lock::UntilExpired (class)">UntilExpired</a></span></span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="LOCKS_WHEN_BUSY-constant" class="">LOCKS_WHEN_BUSY =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available runtime/client locks.</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;Symbol, <span class='object_link'><a href="Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">SidekiqUniqueJobs::Lock::BaseLock</a></span>] all available runtime/client <span class='object_link'><a href="../SidekiqUniqueJobs.html#locks-class_method" title="SidekiqUniqueJobs.locks (method)">locks</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available runtime/client locks</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>around_perform:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/WhileExecuting.html" title="SidekiqUniqueJobs::Lock::WhileExecuting (class)">WhileExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>while_busy:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/WhileExecuting.html" title="SidekiqUniqueJobs::Lock::WhileExecuting (class)">WhileExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>while_executing:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/WhileExecuting.html" title="SidekiqUniqueJobs::Lock::WhileExecuting (class)">WhileExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>while_working:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/WhileExecuting.html" title="SidekiqUniqueJobs::Lock::WhileExecuting (class)">WhileExecuting</a></span></span><span class='comma'>,</span>
  <span class='label'>while_executing_reject:</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="Lock.html" title="SidekiqUniqueJobs::Lock (class)">Lock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Lock/WhileExecutingReject.html" title="SidekiqUniqueJobs::Lock::WhileExecutingReject (class)">WhileExecutingReject</a></span></span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="LOCKS-constant" class="">LOCKS =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available default locks.</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;Symbol, <span class='object_link'><a href="Lock/BaseLock.html" title="SidekiqUniqueJobs::Lock::BaseLock (class)">SidekiqUniqueJobs::Lock::BaseLock</a></span>] all available <span class='object_link'><a href="#default-class_method" title="SidekiqUniqueJobs::Config.default (method)">default</a></span> <span class='object_link'><a href="../SidekiqUniqueJobs.html#locks-class_method" title="SidekiqUniqueJobs.locks (method)">locks</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::Lock::BaseLock] all available default locks</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='const'><span class='object_link'><a href="#LOCKS_WHEN_BUSY-constant" title="SidekiqUniqueJobs::Config::LOCKS_WHEN_BUSY (constant)">LOCKS_WHEN_BUSY</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
<span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#LOCKS_WHILE_ENQUEUED-constant" title="SidekiqUniqueJobs::Config::LOCKS_WHILE_ENQUEUED (constant)">LOCKS_WHILE_ENQUEUED</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
<span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#LOCKS_WITHOUT_UNLOCK-constant" title="SidekiqUniqueJobs::Config::LOCKS_WITHOUT_UNLOCK (constant)">LOCKS_WITHOUT_UNLOCK</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
<span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#LOCKS_FROM_PUSH_TO_PROCESSED-constant" title="SidekiqUniqueJobs::Config::LOCKS_FROM_PUSH_TO_PROCESSED (constant)">LOCKS_FROM_PUSH_TO_PROCESSED</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
<span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="STRATEGIES-constant" class="">STRATEGIES =
          <div class="docstring">
  <div class="discussion">
    <p>Returns Hash&lt;Symbol, SidekiqUniqueJobs::OnConflict::Strategy] all available default strategies.</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;Symbol, <span class='object_link'><a href="OnConflict/Strategy.html" title="SidekiqUniqueJobs::OnConflict::Strategy (class)">SidekiqUniqueJobs::OnConflict::Strategy</a></span>] all available <span class='object_link'><a href="#default-class_method" title="SidekiqUniqueJobs::Config.default (method)">default</a></span> <span class='object_link'><a href="../SidekiqUniqueJobs.html#strategies-class_method" title="SidekiqUniqueJobs.strategies (method)">strategies</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Hash&lt;Symbol, SidekiqUniqueJobs::OnConflict::Strategy] all available default strategies</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='lbrace'>{</span>
  <span class='label'>log:</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="OnConflict.html" title="SidekiqUniqueJobs::OnConflict (module)">OnConflict</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="OnConflict/Log.html" title="SidekiqUniqueJobs::OnConflict::Log (class)">Log</a></span></span><span class='comma'>,</span>
  <span class='label'>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="OnConflict.html" title="SidekiqUniqueJobs::OnConflict (module)">OnConflict</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="OnConflict/Raise.html" title="SidekiqUniqueJobs::OnConflict::Raise (class)">Raise</a></span></span><span class='comma'>,</span>
  <span class='label'>reject:</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="OnConflict.html" title="SidekiqUniqueJobs::OnConflict (module)">OnConflict</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="OnConflict/Reject.html" title="SidekiqUniqueJobs::OnConflict::Reject (class)">Reject</a></span></span><span class='comma'>,</span>
  <span class='label'>replace:</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="OnConflict.html" title="SidekiqUniqueJobs::OnConflict (module)">OnConflict</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="OnConflict/Replace.html" title="SidekiqUniqueJobs::OnConflict::Replace (class)">Replace</a></span></span><span class='comma'>,</span>
  <span class='label'>reschedule:</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="OnConflict.html" title="SidekiqUniqueJobs::OnConflict (module)">OnConflict</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="OnConflict/Reschedule.html" title="SidekiqUniqueJobs::OnConflict::Reschedule (class)">Reschedule</a></span></span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
      
        <dt id="PREFIX-constant" class="">PREFIX =
          <div class="docstring">
  <div class="discussion">
    <p>Returns by default we use this prefix.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>'uniquejobs'</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>by default we use this prefix</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>uniquejobs</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="LOCK_TIMEOUT-constant" class="">LOCK_TIMEOUT =
          <div class="docstring">
  <div class="discussion">
    <p>Returns by default don&#39;t wait for locks.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>0</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>by default don&#39;t wait for locks</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>0</span></pre></dd>
      
        <dt id="LOCK_TTL-constant" class="">LOCK_TTL =
          <div class="docstring">
  <div class="discussion">
    

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

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>nil</span></pre></dd>
      
        <dt id="ENABLED-constant" class="">ENABLED =
          <div class="docstring">
  <div class="discussion">
    <p>Returns by default the gem is enabled.</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>by default the gem is enabled</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>true</span></pre></dd>
      
        <dt id="DEBUG_LUA-constant" class="">DEBUG_LUA =
          <div class="docstring">
  <div class="discussion">
    <p>Returns by default we don&#39;t debug the lua scripts because it is slow.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>by default we don&#39;t debug the lua scripts because it is slow</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>false</span></pre></dd>
      
        <dt id="MAX_HISTORY-constant" class="">MAX_HISTORY =
          <div class="docstring">
  <div class="discussion">
    <p>Returns use a changelog history of 1_000 entries by default.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>1_000</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>use a changelog history of 1_000 entries by default</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>1_000</span></pre></dd>
      
        <dt id="REAPER-constant" class="">REAPER =
          <div class="docstring">
  <div class="discussion">
    <p>Returns prefer the ruby reaper by default since the lua reaper still has problems.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>:ruby</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>prefer the ruby reaper by default since the lua reaper still has problems</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='symbol'>:ruby</span></pre></dd>
      
        <dt id="REAPER_COUNT-constant" class="">REAPER_COUNT =
          <div class="docstring">
  <div class="discussion">
    <p>Returns reap 1_000 orphaned locks at a time by default.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>1_000</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>reap 1_000 orphaned locks at a time by default</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>1_000</span></pre></dd>
      
        <dt id="REAPER_INTERVAL-constant" class="">REAPER_INTERVAL =
          <div class="docstring">
  <div class="discussion">
    <p>Returns reap locks every 10 minutes.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>600</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>reap locks every 10 minutes</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>600</span></pre></dd>
      
        <dt id="REAPER_TIMEOUT-constant" class="">REAPER_TIMEOUT =
          <div class="docstring">
  <div class="discussion">
    <p>Returns stop reaper after 10 seconds.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>10</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>stop reaper after 10 seconds</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>10</span></pre></dd>
      
        <dt id="REAPER_RESURRECTOR_INTERVAL-constant" class="">REAPER_RESURRECTOR_INTERVAL =
          <div class="docstring">
  <div class="discussion">
    <p>Returns check if reaper is dead each 3600 seconds.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>3600</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>check if reaper is dead each 3600 seconds</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='int'>3600</span></pre></dd>
      
        <dt id="REAPER_RESURRECTOR_ENABLED-constant" class="">REAPER_RESURRECTOR_ENABLED =
          <div class="docstring">
  <div class="discussion">
    <p>Returns enable reaper resurrector.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>enable reaper resurrector</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>false</span></pre></dd>
      
        <dt id="USE_LOCK_INFO-constant" class="">USE_LOCK_INFO =
          <div class="docstring">
  <div class="discussion">
    <p>Returns while useful it also adds overhead so disable lock_info by default.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>while useful it also adds overhead so disable lock_info by default</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>false</span></pre></dd>
      
        <dt id="RAISE_ON_CONFIG_ERROR-constant" class="">RAISE_ON_CONFIG_ERROR =
          <div class="docstring">
  <div class="discussion">
    <p>Returns by default we don&#39;t raise validation errors for workers.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>by default we don&#39;t raise validation errors for workers</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='kw'>false</span></pre></dd>
      
        <dt id="REDIS_VERSION-constant" class="">REDIS_VERSION =
          <div class="docstring">
  <div class="discussion">
    <p>Returns default redis version is only to avoid NoMethodError on nil.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>0.0.0</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>default redis version is only to avoid NoMethodError on nil</p>
</div>
      
    </li>
  
</ul>

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
    </dl>
  







  
    <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="#default-class_method" title="default (class method)">.<strong>default</strong>  &#x21d2; SidekiqUniqueJobs::Config </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns a default configuration.</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="#add_lock-instance_method" title="#add_lock (instance method)">#<strong>add_lock</strong>(name, klass)  &#x21d2; void </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Adds a lock type to the configuration.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Adds an on_conflict strategy to the configuration.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Memoized variable to get the class name.</p>
</div></span>
  
</li>

      
        <li class="public deprecated">
  <span class="summary_signature">
    
      <a href="#default_lock_timeout-instance_method" title="#default_lock_timeout (instance method)">#<strong>default_lock_timeout</strong>  &#x21d2; nil, Integer </a>
    

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

  
    <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'></div></span>
  
</li>

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

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

  
    <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'></div></span>
  
</li>

      
        <li class="public deprecated">
  <span class="summary_signature">
    
      <a href="#default_lock_ttl-instance_method" title="#default_lock_ttl (instance method)">#<strong>default_lock_ttl</strong>  &#x21d2; nil, Integer </a>
    

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

  
    <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'></div></span>
  
</li>

      
        <li class="public deprecated">
  <span class="summary_signature">
    
      <a href="#default_lock_ttl=-instance_method" title="#default_lock_ttl= (instance method)">#<strong>default_lock_ttl=</strong>(obj)  &#x21d2; &lt;type&gt; </a>
    

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

  
    <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'></div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The current version of redis.</p>
</div></span>
  
</li>

      
    </ul>
  



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

    
      <div class="method_details first">
  <h3 class="signature first" id="default-class_method">
  
    .<strong>default</strong>  &#x21d2; <tt><span class='object_link'><a href="" title="SidekiqUniqueJobs::Config (class)">SidekiqUniqueJobs::Config</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns a default configuration</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
      <pre class="example code"><code>SidekiqUniqueJobs::Config.default =&gt; &lt;concurrent/mutable_struct/thread_safe_config SidekiqUniqueJobs::Config {
default_lock_timeout: 0,
default_lock_ttl: nil,
enabled: true,
lock_prefix: &quot;uniquejobs&quot;,
logger: #&lt;Sidekiq::Logger:0x00007f81e096b0e0 @level=1 ...&gt;,
locks: {
  around_perform: SidekiqUniqueJobs::Lock::WhileExecuting,
  while_busy: SidekiqUniqueJobs::Lock::WhileExecuting,
  while_executing: SidekiqUniqueJobs::Lock::WhileExecuting,
  while_working: SidekiqUniqueJobs::Lock::WhileExecuting,
  while_executing_reject: SidekiqUniqueJobs::Lock::WhileExecutingReject,
  until_executing: SidekiqUniqueJobs::Lock::UntilExecuting,
  while_enqueued: SidekiqUniqueJobs::Lock::UntilExecuting,
  until_expired: SidekiqUniqueJobs::Lock::UntilExpired,
  until_completed: SidekiqUniqueJobs::Lock::UntilExecuted,
  until_executed: SidekiqUniqueJobs::Lock::UntilExecuted,
  until_performed: SidekiqUniqueJobs::Lock::UntilExecuted,
  until_processed: SidekiqUniqueJobs::Lock::UntilExecuted,
  until_and_while_executing: SidekiqUniqueJobs::Lock::UntilAndWhileExecuting,
  until_successfully_completed: SidekiqUniqueJobs::Lock::UntilExecuted
},
strategies: {
  log: SidekiqUniqueJobs::OnConflict::Log,
  raise: SidekiqUniqueJobs::OnConflict::Raise,
  reject: SidekiqUniqueJobs::OnConflict::Reject,
  replace: SidekiqUniqueJobs::OnConflict::Replace,
  reschedule: SidekiqUniqueJobs::OnConflict::Reschedule
},
debug_lua: false,
max_history: 1000,
reaper:: ruby,
reaper_count: 1000,
lock_info: false,
raise_on_config_error: false,
}&gt;</code></pre>
    
  </div>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="" title="SidekiqUniqueJobs::Config (class)">SidekiqUniqueJobs::Config</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a default configuration</p>
</div>
      
    </li>
  
</ul>

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


176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 176</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span> <span class='comment'># rubocop:disable Metrics/MethodLength
</span>  <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
    <span class='const'><span class='object_link'><a href="#LOCK_TIMEOUT-constant" title="SidekiqUniqueJobs::Config::LOCK_TIMEOUT (constant)">LOCK_TIMEOUT</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#LOCK_TTL-constant" title="SidekiqUniqueJobs::Config::LOCK_TTL (constant)">LOCK_TTL</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#ENABLED-constant" title="SidekiqUniqueJobs::Config::ENABLED (constant)">ENABLED</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#PREFIX-constant" title="SidekiqUniqueJobs::Config::PREFIX (constant)">PREFIX</a></span></span><span class='comma'>,</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_logger'>logger</span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#LOCKS-constant" title="SidekiqUniqueJobs::Config::LOCKS (constant)">LOCKS</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#STRATEGIES-constant" title="SidekiqUniqueJobs::Config::STRATEGIES (constant)">STRATEGIES</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#DEBUG_LUA-constant" title="SidekiqUniqueJobs::Config::DEBUG_LUA (constant)">DEBUG_LUA</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#MAX_HISTORY-constant" title="SidekiqUniqueJobs::Config::MAX_HISTORY (constant)">MAX_HISTORY</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER-constant" title="SidekiqUniqueJobs::Config::REAPER (constant)">REAPER</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER_COUNT-constant" title="SidekiqUniqueJobs::Config::REAPER_COUNT (constant)">REAPER_COUNT</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER_INTERVAL-constant" title="SidekiqUniqueJobs::Config::REAPER_INTERVAL (constant)">REAPER_INTERVAL</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER_TIMEOUT-constant" title="SidekiqUniqueJobs::Config::REAPER_TIMEOUT (constant)">REAPER_TIMEOUT</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER_RESURRECTOR_INTERVAL-constant" title="SidekiqUniqueJobs::Config::REAPER_RESURRECTOR_INTERVAL (constant)">REAPER_RESURRECTOR_INTERVAL</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REAPER_RESURRECTOR_ENABLED-constant" title="SidekiqUniqueJobs::Config::REAPER_RESURRECTOR_ENABLED (constant)">REAPER_RESURRECTOR_ENABLED</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#USE_LOCK_INFO-constant" title="SidekiqUniqueJobs::Config::USE_LOCK_INFO (constant)">USE_LOCK_INFO</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#RAISE_ON_CONFIG_ERROR-constant" title="SidekiqUniqueJobs::Config::RAISE_ON_CONFIG_ERROR (constant)">RAISE_ON_CONFIG_ERROR</a></span></span><span class='comma'>,</span>
    <span class='const'><span class='object_link'><a href="#REDIS_VERSION-constant" title="SidekiqUniqueJobs::Config::REDIS_VERSION (constant)">REDIS_VERSION</a></span></span><span class='comma'>,</span>
  <span class='rparen'>)</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="add_lock-instance_method">
  
    #<strong>add_lock</strong>(name, klass)  &#x21d2; <tt>void</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p class="note returns_void">This method returns an undefined value.</p><p>Adds a lock type to the configuration. It will raise if the lock exists already</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'><p>Add a custom lock</p>
</div></p>
      
      <pre class="example code"><code><span class='id identifier rubyid_add_lock'>add_lock</span><span class='lparen'>(</span><span class='symbol'>:my_lock</span><span class='comma'>,</span> <span class='const'>CustomLocks</span><span class='op'>::</span><span class='const'>MyLock</span><span class='rparen'>)</span></code></pre>
    
  </div>
<p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>name</span>
      
      
        <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the lock</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>klass</span>
      
      
        <span class='type'>(<tt>Class</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the class describing the lock</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'></span>
      
      
      
        
        <div class='inline'><p>DuplicateLock when the name already exists</p>
</div>
      
    </li>
  
</ul>

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


275
276
277
278
279
280
281</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 275</span>

<span class='kw'>def</span> <span class='id identifier rubyid_add_lock'>add_lock</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_lock_sym'>lock_sym</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
  <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="DuplicateLock.html" title="SidekiqUniqueJobs::DuplicateLock (class)">DuplicateLock</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> already defined, please use another name</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_locks'>locks</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_lock_sym'>lock_sym</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_new_locks'>new_locks</span> <span class='op'>=</span> <span class='id identifier rubyid_locks'>locks</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_lock_sym'>lock_sym</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_locks'>locks</span> <span class='op'>=</span> <span class='id identifier rubyid_new_locks'>new_locks</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="add_strategy-instance_method">
  
    #<strong>add_strategy</strong>(name, klass)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Adds an on_conflict strategy to the configuration.</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'><p>Add a custom strategy</p>
</div></p>
      
      <pre class="example code"><code><span class='id identifier rubyid_add_lock'>add_lock</span><span class='lparen'>(</span><span class='symbol'>:my_strategy</span><span class='comma'>,</span> <span class='const'>CustomStrategies</span><span class='op'>::</span><span class='const'>MyStrategy</span><span class='rparen'>)</span></code></pre>
    
  </div>
<p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>name</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the custom strategy</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>klass</span>
      
      
        <span class='type'>(<tt>Class</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the class describing the strategy</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="DuplicateStrategy.html" title="SidekiqUniqueJobs::DuplicateStrategy (class)">DuplicateStrategy</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>when the name already exists</p>
</div>
      
    </li>
  
</ul>

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


294
295
296
297
298
299
300</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 294</span>

<span class='kw'>def</span> <span class='id identifier rubyid_add_strategy'>add_strategy</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_strategy_sym'>strategy_sym</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
  <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="DuplicateStrategy.html" title="SidekiqUniqueJobs::DuplicateStrategy (class)">DuplicateStrategy</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> already defined, please use another name</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_strategies'>strategies</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_strategy_sym'>strategy_sym</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_new_strategies'>new_strategies</span> <span class='op'>=</span> <span class='id identifier rubyid_strategies'>strategies</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_strategy_sym'>strategy_sym</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_strategies'>strategies</span> <span class='op'>=</span> <span class='id identifier rubyid_new_strategies'>new_strategies</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="class_name-instance_method">
  
    #<strong>class_name</strong>  &#x21d2; <tt>String</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Memoized variable to get the class name</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>name of the class</p>
</div>
      
    </li>
  
</ul>

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


258
259
260</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 258</span>

<span class='kw'>def</span> <span class='id identifier rubyid_class_name'>class_name</span>
  <span class='ivar'>@class_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_lock_timeout-instance_method">
  
    #<strong>default_lock_timeout</strong>  &#x21d2; <tt>nil</tt>, <tt>Integer</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'></div></div>
<p>Default Lock Timeout</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>nil</tt>, <tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>configured value or nil</p>
</div>
      
    </li>
  
</ul>

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


246
247
248
249
250</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 246</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_lock_timeout'>default_lock_timeout</span>
  <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[DEPRECATION] `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_content'>` is deprecated.</span><span class='tstring_end'>&quot;</span></span> \
       <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> Please use `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#lock_timeout` instead.</span><span class='tstring_end'>&quot;</span></span>
  <span class='id identifier rubyid_lock_timeout'>lock_timeout</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_lock_timeout=-instance_method">
  
    #<strong>default_lock_timeout=</strong>(obj)  &#x21d2; <tt>Integer</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'></div></div>
<p>Set new value for default_lock_timeout</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>obj</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>value to set (seconds)</p>
</div>
      
    </li>
  
</ul>

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

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


221
222
223
224
225</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 221</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_lock_timeout='>default_lock_timeout=</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[DEPRECATION] `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_content'>` is deprecated.</span><span class='tstring_end'>&quot;</span></span> \
       <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> Please use `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#lock_timeout=` instead.</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_lock_timeout'>lock_timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_lock_ttl-instance_method">
  
    #<strong>default_lock_ttl</strong>  &#x21d2; <tt>nil</tt>, <tt>Integer</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'></div></div>
<p>Default lock TTL (Time To Live)</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>nil</tt>, <tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>configured value or nil</p>
</div>
      
    </li>
  
</ul>

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


233
234
235
236
237</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 233</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_lock_ttl'>default_lock_ttl</span>
  <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[DEPRECATION] `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_content'>` is deprecated.</span><span class='tstring_end'>&quot;</span></span> \
       <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> Please use `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#lock_ttl` instead.</span><span class='tstring_end'>&quot;</span></span>
  <span class='id identifier rubyid_lock_ttl'>lock_ttl</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_lock_ttl=-instance_method">
  
    #<strong>default_lock_ttl=</strong>(obj)  &#x21d2; <tt>&lt;type&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'></div></div>
<p>Set the default_lock_ttl</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>obj</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>value to set (seconds)</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>&lt;type&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><description></p>
</div>
      
    </li>
  
</ul>

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


207
208
209
210
211</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 207</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_lock_ttl='>default_lock_ttl=</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[DEPRECATION] `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_content'>` is deprecated.</span><span class='tstring_end'>&quot;</span></span> \
       <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> Please use `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>#lock_ttl=` instead.</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_lock_ttl'>lock_ttl</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="redis_version-instance_method">
  
    #<strong>redis_version</strong>  &#x21d2; <tt>String</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The current version of redis</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a version string eg. <code>5.0.1</code></p>
</div>
      
    </li>
  
</ul>

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


308
309
310
311</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/config.rb', line 308</span>

<span class='kw'>def</span> <span class='id identifier rubyid_redis_version'>redis_version</span>
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_current_redis_version'>current_redis_version</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch_redis_version'><span class='object_link'><a href="../SidekiqUniqueJobs.html#fetch_redis_version-class_method" title="SidekiqUniqueJobs.fetch_redis_version (method)">fetch_redis_version</a></span></span> <span class='kw'>if</span> <span class='id identifier rubyid_current_redis_version'>current_redis_version</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="#REDIS_VERSION-constant" title="SidekiqUniqueJobs::Config::REDIS_VERSION (constant)">REDIS_VERSION</a></span></span>
  <span class='id identifier rubyid_current_redis_version'>current_redis_version</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

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