mhenrixon/sidekiq-unique-jobs

View on GitHub
doc/SidekiqUniqueJobs/Script/Caller.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>
  Module: SidekiqUniqueJobs::Script::Caller
  
    &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::Script::Caller";
  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'><span class='object_link'><a href="../Script.html" title="SidekiqUniqueJobs::Script (module)">Script</a></span></span>
     &raquo; 
    <span class="title">Caller</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>Module: SidekiqUniqueJobs::Script::Caller
  
  
  
</h1>
<div class="box_info">
  

  
  
  
  
  

  
  <dl>
    <dt>Included in:</dt>
    <dd><span class='object_link'><a href="../Locksmith.html" title="SidekiqUniqueJobs::Locksmith (class)">Locksmith</a></span>, <span class='object_link'><a href="../OnConflict/Strategy.html" title="SidekiqUniqueJobs::OnConflict::Strategy (class)">OnConflict::Strategy</a></span>, <span class='object_link'><a href="../Orphans/Reaper.html" title="SidekiqUniqueJobs::Orphans::Reaper (class)">Orphans::Reaper</a></span>, <span class='object_link'><a href="../Redis/Entity.html" title="SidekiqUniqueJobs::Redis::Entity (class)">Redis::Entity</a></span></dd>
  </dl>
  

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

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Module Caller provides the convenience method #call_script</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>
      Class Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#call_script-class_method" title="call_script (class method)">.<strong>call_script</strong>(file_name, *args)  &#x21d2; true, ... </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Convenience method to reduce typing,   calls redis lua scripts.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#debug_lua-class_method" title="debug_lua (class method)">.<strong>debug_lua</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

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

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#do_call-class_method" title="do_call (class method)">.<strong>do_call</strong>(file_name, conn, keys, argv)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Only used to reduce a little bit of duplication.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#extract_args-class_method" title="extract_args (class method)">.<strong>extract_args</strong>(*args)  &#x21d2; Array&lt;Redis, Array, Array&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Utility method to allow both symbol keys and arguments.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#max_history-class_method" title="max_history (class method)">.<strong>max_history</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

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

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#now_f-class_method" title="now_f (class method)">.<strong>now_f</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

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

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#redis_version-class_method" title="redis_version (class method)">.<strong>redis_version</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></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="call_script-class_method">
  
    
      <span class="overload">.<strong>call_script</strong>(file_name, keys, argv, conn)  &#x21d2; <tt>true</tt>, ... </span>
    
      <span class="overload">.<strong>call_script</strong>(file_name, conn, keys: , argv: )  &#x21d2; <tt>true</tt>, ... </span>
    
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Convenience method to reduce typing,
  calls redis lua scripts.</p>


  </div>
</div>
<div class="tags">
  
  <p class="tag_title">Overloads:</p>
  <ul class="overload">
    
      
      <li class="overload_item">
        <span class="signature">.<strong>call_script</strong>(file_name, keys, argv, conn)  &#x21d2; <tt>true</tt>, ... </span>
        <div class="docstring">
  <div class="discussion">
    <p>Call script without options hash</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>file_name</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the file</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>keys</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;String&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>to pass to the the script</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>argv</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;String&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>arguments to pass to the script</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>conn</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a redis connection</p>
</div>
      
    </li>
  
</ul>


</div>
      </li>
    
      
      <li class="overload_item">
        <span class="signature">.<strong>call_script</strong>(file_name, conn, keys: , argv: )  &#x21d2; <tt>true</tt>, ... </span>
        <div class="docstring">
  <div class="discussion">
    <p>Call script with options hash</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>file_name</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the file</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>conn</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a redis connection</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>options</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>arguments to pass to the script file</p>
</div>
      
    </li>
  
</ul>

  
    
    
    
    
    
    
    
    


</div>
      </li>
    
  </ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>, <tt>String</tt>, <tt>Integer</tt>, <tt>Float</tt>, <tt>nil</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>returns the return value of the lua script</p>
</div>
      
    </li>
  
</ul>

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


41
42
43
44
45
46
47
48
49
50
51
52</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/script/caller.rb', line 41</span>

<span class='kw'>def</span> <span class='id identifier rubyid_call_script'>call_script</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_args'>extract_args</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_do_call'>do_call</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_conn'>conn</span>

  <span class='id identifier rubyid_pool'>pool</span> <span class='op'>=</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_redis_pool'>redis_pool</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_redis_pool'>redis_pool</span> <span class='op'>:</span> <span class='kw'>nil</span>

  <span class='id identifier rubyid_redis'>redis</span><span class='lparen'>(</span><span class='id identifier rubyid_pool'>pool</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_new_conn'>new_conn</span><span class='op'>|</span>
    <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_do_call'>do_call</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_new_conn'>new_conn</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span>
    <span class='kw'>yield</span> <span class='id identifier rubyid_result'>result</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
    <span class='id identifier rubyid_result'>result</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="debug_lua-class_method">
  
    .<strong>debug_lua</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li>Config#debug_lua</li>
    
  </ul>

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


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

<span class='kw'>def</span> <span class='id identifier rubyid_debug_lua'>debug_lua</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_config'><span class='object_link'><a href="../../SidekiqUniqueJobs.html#config-class_method" title="SidekiqUniqueJobs.config (method)">config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_debug_lua'>debug_lua</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="do_call-class_method">
  
    .<strong>do_call</strong>(file_name, conn, keys, argv)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Only used to reduce a little bit of duplication</p>


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

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="#call_script-class_method" title="SidekiqUniqueJobs::Script::Caller.call_script (method)">call_script</a></span></li>
    
  </ul>

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


56
57
58
59
60
61
62
63
64
65</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/script/caller.rb', line 56</span>

<span class='kw'>def</span> <span class='id identifier rubyid_do_call'>do_call</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_argv'>argv</span> <span class='op'>=</span> <span class='id identifier rubyid_argv'>argv</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='lbracket'>[</span>
                           <span class='id identifier rubyid_now_f'>now_f</span><span class='comma'>,</span>
                           <span class='id identifier rubyid_debug_lua'>debug_lua</span><span class='comma'>,</span>
                           <span class='id identifier rubyid_max_history'>max_history</span><span class='comma'>,</span>
                           <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span>
                           <span class='id identifier rubyid_redis_version'>redis_version</span><span class='comma'>,</span>
                         <span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../Script.html" title="SidekiqUniqueJobs::Script (module)">Script</a></span></span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='label'>keys:</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='label'>argv:</span> <span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="extract_args-class_method">
  
    
      <span class="overload">.<strong>call_script</strong>(file_name, keys, argv, conn)  &#x21d2; <tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;<span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&gt;</tt> </span>
    
      <span class="overload">.<strong>call_script</strong>(file_name, conn, keys: , argv: )  &#x21d2; <tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;<span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&gt;</tt> </span>
    
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Utility method to allow both symbol keys and arguments</p>


  </div>
</div>
<div class="tags">
  
  <p class="tag_title">Overloads:</p>
  <ul class="overload">
    
      
      <li class="overload_item">
        <span class="signature">.<strong>call_script</strong>(file_name, keys, argv, conn)  &#x21d2; <tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;<span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&gt;</tt> </span>
        <div class="docstring">
  <div class="discussion">
    <p>Call script without options hash</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>file_name</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the file</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>keys</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;String&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>to pass to the the script</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>argv</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;String&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>arguments to pass to the script</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>conn</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a redis connection</p>
</div>
      
    </li>
  
</ul>


</div>
      </li>
    
      
      <li class="overload_item">
        <span class="signature">.<strong>call_script</strong>(file_name, conn, keys: , argv: )  &#x21d2; <tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;<span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&gt;</tt> </span>
        <div class="docstring">
  <div class="discussion">
    <p>Call script with options hash</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>file_name</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the name of the file</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>conn</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>a redis connection</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>options</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>arguments to pass to the script file</p>
</div>
      
    </li>
  
</ul>

  
    
    
    
    
    
    
    
    


</div>
      </li>
    
  </ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&lt;<span class='object_link'><a href="../Redis.html" title="SidekiqUniqueJobs::Redis (module)">Redis</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>, <span class='object_link'><a href="../../Array.html" title="Array (class)">Array</a></span>&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><description></p>
</div>
      
    </li>
  
</ul>

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


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

<span class='kw'>def</span> <span class='id identifier rubyid_extract_args'>extract_args</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_extract_options!'>extract_options!</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
    <span class='lbracket'>[</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:keys</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:argv</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='rbracket'>]</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_keys'>keys</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
    <span class='id identifier rubyid_argv'>argv</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
    <span class='lbracket'>[</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_argv'>argv</span><span class='rbracket'>]</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="max_history-class_method">
  
    .<strong>max_history</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li>Config#max_history</li>
    
  </ul>

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


115
116
117</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/script/caller.rb', line 115</span>

<span class='kw'>def</span> <span class='id identifier rubyid_max_history'>max_history</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_config'><span class='object_link'><a href="../../SidekiqUniqueJobs.html#config-class_method" title="SidekiqUniqueJobs.config (method)">config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_max_history'>max_history</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="now_f-class_method">
  
    .<strong>now_f</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'>SidekiqUniqueJobs#now_f</span></li>
    
  </ul>

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


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

<span class='kw'>def</span> <span class='id identifier rubyid_now_f'>now_f</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_now_f'><span class='object_link'><a href="../../SidekiqUniqueJobs.html#now_f-class_method" title="SidekiqUniqueJobs.now_f (method)">now_f</a></span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="redis_version-class_method">
  
    .<strong>redis_version</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

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

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li>Config#max_history</li>
    
  </ul>

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


122
123
124</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/script/caller.rb', line 122</span>

<span class='kw'>def</span> <span class='id identifier rubyid_redis_version'>redis_version</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_config'><span class='object_link'><a href="../../SidekiqUniqueJobs.html#config-class_method" title="SidekiqUniqueJobs.config (method)">config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_redis_version'><span class='object_link'><a href="../Config.html#redis_version-instance_method" title="SidekiqUniqueJobs::Config#redis_version (method)">redis_version</a></span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

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