<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="239647" data-post-id="239647">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benwilson512" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benwilson512/120/1457_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benwilson512
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Craft GraphQL APIs in Elixir with Absinthe</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="belaustegui" data-post="242" data-topic="22449">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/belaustegui/48/36580_2.png" class="avatar"> belaustegui:</div>
<blockquote>
<p>sections about scaling</p>
</blockquote>
</aside>
<p>I would imagine that the sections about scaling are probably not relevant since the runtime characteristics of Ruby and Elixir are so different. The idempotency stuff may be relevant.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="239647" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/243">Post #242</a>
	                </div>
	            </div>
              <div id="likers-container-239647" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="239647"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #242"></div>
  </section>
</div>
    <div class="postbit" id="240845" data-post-id="240845">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Harrygr" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Harrygr/120/17411_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Harrygr
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi all, I’m getting stuck into using Oban in my project and would like a bit of advice on cancelling jobs according to tags when the related entity is deleted. I saw this touched upon in a much earlier post in this thread but am wondering if there’s an easier way to query jobs by tag.</p>
<p>E.g I have a worker for scheduling “reminders” to be sent in the future: <code>MyApp.SendReminder</code>. When these are inserted they’re tagged with the related entity (e.g. <code>entity:123</code>).</p>
<p>Say <code>entity</code> with ID 123 is deleted, I obviously no longer want these reminder jobs to run. I’ve found <a href="https://hexdocs.pm/oban/Oban.html#cancel_all_jobs/2" rel="noopener nofollow ugc"><code>cancel_all_jobs/2</code></a> but I’m not entirely sure how to query for jobs with the appropriate tag. It looks like the tags are stored as a string in the DB. Are there any helpers to get jobs by a tag?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="240845" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/244">Post #243</a>
	                </div>
	            </div>
              <div id="likers-container-240845" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="240845"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #243"></div>
  </section>
</div>
    <div class="postbit" id="240945" data-post-id="240945">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Harrygr" data-post="244" data-topic="22449">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/harrygr/48/17411_2.png" class="avatar"> Harrygr:</div>
<blockquote>
<p>It looks like the tags are stored as a string in the DB. Are there any helpers to get jobs by a tag?</p>
</blockquote>
</aside>
<p>Tags are stored as a text array in the database. There are two approaches you can take:</p>
<p>A) Use a query to cancel the jobs and stop them from running, as you mentioned. That query could look like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Oban.Job
|&gt; where([j], "entity:123" in j.tags)
|&gt; Oban.cancel_all_jobs()
</code></pre>
<p>B) Check the tags as the job executes and make it a no-op. You could check within the <code>perform/1</code> function like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def perform(%Job{args: args, tags: ["entity:" &lt;&gt; entity_id}) do
  case MyApp.Repo.get(Entity, entity_id) do
    %Entity{} -&gt; ...
    nil -&gt; ...
  end
end
</code></pre>
<p>The direction you take is up to you and probably depends on the volume of jobs you have. With a handful of extraneous jobs, I’d favor option B.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="240945" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/245">Post #244</a>
	                </div>
	            </div>
              <div id="likers-container-240945" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="240945"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #244"></div>
  </section>
</div>
    <div class="postbit" id="241026" data-post-id="241026">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Harrygr" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Harrygr/120/17411_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Harrygr
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Many thanks. My use case is actually a little more complex than I described, so I went with option A, but the noop pattern is useful for some other cases I have.</p>
<p>Thanks for the very handy library!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="241026" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/246">Post #245</a>
	                </div>
	            </div>
              <div id="likers-container-241026" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="241026"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #245"></div>
  </section>
</div>
    <div class="postbit" id="242817" data-post-id="242817">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oban v2.11, Pro v0.10, and Web v2.9 are out and we’ve written a proper announcement post—<a href="https://getoban.pro/articles/oban-2-11-pro-0-10-web-2-9-released" rel="noopener nofollow ugc">Oban v2.11, Pro v0.10, and Web v2.9 Released</a>.</p>
<p>Take a look, or browse the <a href="https://hexdocs.pm/oban/changelog.html" rel="noopener nofollow ugc">CHANGELOG</a> to see what’s new.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="242817" data-batch-url="/posts/batch_likers">
                        8
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/247">Post #246</a>
	                </div>
	            </div>
              <div id="likers-container-242817" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="242817"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #246"></div>
  </section>
</div>
    <div class="postbit" id="246666" data-post-id="246666">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tansan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tansan/120/25915_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tansan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi, is there still free a dashboard available or is it just the Web paid version? I might not be your target demographic, but do you have any startup pricing plans? my total monthly server costs is less than $20 while Oban is $39 a month.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="246666" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/248">Post #247</a>
	                </div>
	            </div>
              <div id="likers-container-246666" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="246666"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #247"></div>
  </section>
</div>
    <div class="postbit" id="249061" data-post-id="249061">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oban v2.12 and Oban Pro v0.11 are out!</p>
<p>These releases were dedicated to enriching the testing experience and expanding config, plugin, and queue validation across all environments. They’re so focused on testing that we’ve dubbed them the “don’t forget to floss” and “eat your veggies” editions, respectively <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20"></p>
<h2><a name="p-249061-oban-v212-1" class="anchor" href="#p-249061-oban-v212-1" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/gem_stone.png?v=15" title=":gem_stone:" class="emoji" alt=":gem_stone:" loading="lazy" width="20" height="20"> Oban v2.12</h2>
<h3><a name="p-249061-testing-modes-2" class="anchor" href="#p-249061-testing-modes-2" aria-label="Heading link" rel="nofollow"></a>Testing Modes</h3>
<p>Testing modes bring a new, vastly improved way to configure Oban for testing. The new <code>testing</code> option explicitly states that Oban should operate in a restricted mode for the given environment.</p>
<p>Behind the scenes, the new testing modes rely on validation layers within Oban’s <code>Config</code> module. Now production configuration is validated automatically during test runs. Even though queues and plugins aren’t <em>started</em> in the test environment, their configuration is still validated.</p>
<p>To switch, stop overriding <code>plugins</code> and <code>queues</code> and enable a testing mode in your <code>test.exs</code> config:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :my_app, Oban, testing: :manual
</code></pre>
<p>Testing in <code>:manual</code> mode is identical to testing in older versions of Oban: jobs won’t run automatically, so you can use helpers like <code>assert_enqueued</code> and execute them manually with <code>Oban.drain_queue/2</code>.</p>
<p>An alternate <code>:inline</code> allows Oban to bypass all database interaction and run jobs <em>immediately in the process that enqueued them</em>.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :my_app, Oban, testing: :inline
</code></pre>
<p>Finally, new <a href="https://hexdocs.pm/oban/testing.html" rel="noopener nofollow ugc">testing guides</a> cover test setup, unit <a href="https://hexdocs.pm/oban/testing_workers.html" rel="noopener nofollow ugc">testing workers</a>, integration <a href="https://hexdocs.pm/oban/testing_queues.html" rel="noopener nofollow ugc">testing queues</a>, and testing <a href="https://hexdocs.pm/oban/testing_config.html" rel="noopener nofollow ugc">dynamic configuration</a>.</p>
<h3><a name="p-249061-global-peer-module-3" class="anchor" href="#p-249061-global-peer-module-3" aria-label="Heading link" rel="nofollow"></a>Global Peer Module</h3>
<p>Oban v2.11 introduced centralized leadership via Postgres tables. However,<br>
Postgres-based leadership isn’t always a good fit. For example, an ephemeral leadership mechanism is preferred for integration testing.</p>
<p>In that case, you can make use of the new <code>:global</code> powered peer module for leadership:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :my_app, Oban,
  peer: Oban.Peers.Global,
  ...
</code></pre>
<p>For other improvements and minor bug fixes, view the  <a href="https://hexdocs.pm/oban/changelog.html" rel="noopener nofollow ugc">complete Oban CHANGELOG</a>.</p>
<h2><a name="p-249061-oban-pro-v011-4" class="anchor" href="#p-249061-oban-pro-v011-4" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/sparkles.png?v=15" title=":sparkles:" class="emoji" alt=":sparkles:" loading="lazy" width="20" height="20"> Oban Pro v0.11</h2>
<p>In league with Oban v2.12, Pro v0.11 focused <em>extensively</em> on testing improvements.</p>
<h3><a name="p-249061-pro-testing-module-5" class="anchor" href="#p-249061-pro-testing-module-5" aria-label="Heading link" rel="nofollow"></a>Pro Testing Module</h3>
<p>The centerpiece of those improvements is the <code>Oban.Pro.Testing</code> module, a drop-in replacement for <code>Oban.Testing</code> with considerations for unit, integration, and acceptance testing Pro workers.</p>
<p>The helpers provided by <code>Oban.Pro.Testing</code> are dogfooded—that is, they are what Pro uses for testing internally!</p>
<p>Here’s a taste of how one of the new testing helpers, <code>run_workflow/2</code>, makes it simple to run a workflow optimally, inline, without any extra configuration:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">workflow =
  MyWorkflow.new_workflow()
  |&gt; MyWorkflow.add(:com, MyWorkflow.new(%{text: text, mode: :complexity}))
  |&gt; MyWorkflow.add(:sen, MyWorkflow.new(%{text: text, mode: :sentiment}))
  |&gt; MyWorkflow.add(:syn, MyWorkflow.new(%{text: text, mode: :syntax}))
  |&gt; MyWorkflow.add(:exp, MyWorkflow.new(%{}), deps: [:com, :sen, :syn])

# Using with_summary: false gives us a list of executed jobs, including the
# job's recorded result.
assert [_com, _sen, _syn, exp_job] = run_workflow(workflow, with_summary: false)

assert {:ok, 0.8} = MyWorkflow.fetch_result(exp_job)
</code></pre>
<p>Furthermore, there are new guides to <a href="https://hexdocs.pm/oban/testing.html" rel="noopener nofollow ugc">introduce Pro testing</a>, and walk you through <a href="https://getoban.pro/docs/pro/testing_workers.html" rel="noopener nofollow ugc">testing Pro workers</a>.</p>
<h3><a name="p-249061-fewer-plugins-same-functionality-6" class="anchor" href="#p-249061-fewer-plugins-same-functionality-6" aria-label="Heading link" rel="nofollow"></a>Fewer Plugins, Same Functionality</h3>
<p>In an effort to simplify testing scenarios, we’ve pulled some functionality out of plugins and made that functionality available out of the box, without any extra configuration.</p>
<p>The <code>BatchManager</code> and <code>Relay</code> plugins are deprecated and it’s no longer necessary to run them at all! Each deprecated plugin will emit a warning when your app starts, so you’ll probably want to remove them:</p>
<pre data-code-wrap="diff"><code class="lang-diff">config :my_app, Oban, plugins: [
- Oban.Pro.Plugins.BatchManager,
- Oban.Pro.Plugins.Relay
]
</code></pre>
<h3><a name="p-249061-enhanced-workflow-tools-7" class="anchor" href="#p-249061-enhanced-workflow-tools-7" aria-label="Heading link" rel="nofollow"></a>Enhanced Workflow Tools</h3>
<p>Workflow workers now expose <code>all_workflow_jobs/2</code> for fetching other jobs in a workflow without streaming. It operates in three modes: fetch all jobs in the workflow, only the current job’s dependencies, or only specific dependencies by name. The same options are now supported by  <code>stream_workflow_jobs/2</code> as well, so you can switch to streaming for large workflows.</p>
<p>Check the <a href="https://getoban.pro/docs/pro/0.11.0/changelog.html" rel="noopener nofollow ugc">Pro CHANGELOG</a> for a complete list of enhancements and bug fixes.</p>
<p>Find us in <a class="hashtag-cooked" href="/tag/oban/1833" data-type="tag" data-slug="oban" data-id="1833" data-style-type="icon" data-icon="tag" rel="nofollow"><span class="hashtag-icon-placeholder"><svg class="fa d-icon d-icon-square-full svg-icon svg-node"><use href="#square-full"></use></svg></span><span>oban</span></a> on Elixir Slack or ask here if you need any help!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="249061" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/249">Post #248</a>
	                </div>
	            </div>
              <div id="likers-container-249061" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="249061"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #248"></div>
  </section>
</div>
    <div class="postbit" id="253799" data-post-id="253799">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lud" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/120/14382_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lud
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/sorentwo" rel="nofollow">@sorentwo</a> , a quick question: The backoff calback must return a number of seconds to wait <em>after the previous attempt</em>, right? Or the seconds relative to the job first enqueing date?</p>
<p>Thank you.</p>
<p>I am trying to compute a simple backoff that would make 20 attempts in about 48 hours, I found this site : <a href="http://backoffcalculator.com/?interval=15&amp;attempts=20&amp;rate=1.545" class="inline-onebox" rel="noopener nofollow ugc">Exponential Backoff Calculator</a> but all amounts are actually from the first date.</p>
<p>If it is from the previous attempt then this works:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    Stream.cycle([15])
    |&gt; Stream.scan(fn a, acc -&gt; floor(a + acc * 1.4865) end)
    |&gt; Enum.at(attempt - 1)
    |&gt; Kernel.+(Enum.random(1..5))
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="253799" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/250">Post #249</a>
	                </div>
	            </div>
              <div id="likers-container-253799" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="253799"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #249"></div>
  </section>
</div>
    <div class="postbit" id="253838" data-post-id="253838">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="lud" data-post="250" data-topic="22449">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/48/14382_2.png" class="avatar"> lud:</div>
<blockquote>
<p>The backoff calback must return a number of seconds to wait <em>after the previous attempt</em>, right? Or the seconds relative to the job first enqueing date?</p>
</blockquote>
</aside>
<p>It’s the number of seconds to wait after the current attempt finishes. Think of it as “now + backoff”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="253838" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/251">Post #250</a>
	                </div>
	            </div>
              <div id="likers-container-253838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="253838"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #250"></div>
  </section>
</div>
    <div class="postbit" id="253839" data-post-id="253839">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lud" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/120/14382_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lud
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great, thank you.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="253839" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-reliable-and-observable-job-processing/22449/252">Post #251</a>
	                </div>
	            </div>
              <div id="likers-container-253839" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="253839"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #251"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/22449/load_more?page=26">Load more posts (61 remaining)</a>
</div></template></turbo-stream>