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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>See this thread for more details about Oban Web being open sourced: <a href="https://forum.elixirforum.com/t/oban-web-to-be-open-sourced/67100" class="inline-onebox" rel="nofollow">Oban Web to be open sourced</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="351167" 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/306">Post #305</a>
	                </div>
	            </div>
              <div id="likers-container-351167" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="351167"
                     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 #305"></div>
  </section>
</div>
    <div class="postbit" id="353186" data-post-id="353186">
  <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><a href="https://github.com/oban-bg/oban/releases/tag/v2.19.0" rel="noopener nofollow ugc">Oban v2.19</a> is out!</p>
<p>The minimum Elixir version is now v1.15. The official policy is to only support the three latest versions of Elixir.</p>
<h2><a name="p-353186-mysql-support-1" class="anchor" href="#p-353186-mysql-support-1" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/dolphin.png?v=15" title=":dolphin:" class="emoji" alt=":dolphin:" loading="lazy" width="20" height="20"> MySQL Support</h2>
<p>Oban officially supports MySQL with the new <code>Dolphin</code> engine. Oban supports modern (read “with full JSON support”) MySQL <a href="https://dev.mysql.com/doc/relnotes/mysql/8.4/en/" rel="noopener nofollow ugc">versions from 8.4</a> on, and has been tested on the highly scalable <a href="https://planetscale.com/" rel="noopener nofollow ugc">Plantescale</a> database.</p>
<p>Running on MySQL is as simple as specifying the <code>Dolphin</code> engine in your configuration:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :my_app, Oban,
  engine: Oban.Engines.Dolphin,
  queues: [default: 10],
  repo: MyApp.Repo
</code></pre>
<p>With this addition, Oban can run in <a href="https://hex.pm/packages/myxql" rel="nofollow">estimated 10% more</a> Elixir applications!</p>
<h2><a name="p-353186-automated-installer-2" class="anchor" href="#p-353186-automated-installer-2" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/alembic.png?v=15" title=":alembic:" class="emoji" alt=":alembic:" loading="lazy" width="20" height="20"> Automated Installer</h2>
<p>Installing Oban into a new application is simplified with a new <a href="https://hexdocs.pm/igniter/readme.html" rel="noopener nofollow ugc">igniter</a> powered <code>mix</code> task. The new <code>oban.install</code> task handles installing and configuring a standard Oban installation, and it will deduce the correct <code>engine</code> and <code>notifier</code> automatically based on the database adapter.</p>
<pre data-code-wrap="bash"><code class="lang-bash">mix igniter.install oban
</code></pre>
<p>This <code>oban.install</code> task is currently the <a rel="nofollow">recommended way to install</a> Oban. As a bonus, the task composes together with other igniter installers, making it possible to install <code>phoenix</code>, <code>ash</code>, <code>oban</code>, and other packages with a single command:</p>
<pre data-code-wrap="bash"><code class="lang-bash">mix igniter.install phoenix ash_phoenix ash_postgres ash_oban
</code></pre>
<p>Look at the <a rel="nofollow"><code>Mix.Oban.Install</code></a> docs for full usage and options.</p>
<h2><a name="p-353186-logging-enhancements-3" class="anchor" href="#p-353186-logging-enhancements-3" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/notebook_with_decorative_cover.png?v=15" title=":notebook_with_decorative_cover:" class="emoji" alt=":notebook_with_decorative_cover:" loading="lazy" width="20" height="20"> Logging Enhancements</h2>
<p>Logging in a busy system may be noisy due to job events, but there are other events that are particularly useful for diagnosing issues. A new <code>events</code> option for <code>attach_default_logger/1</code> allows selective event logging, so it’s possible to receive important notices such as notifier connectivity issues, without logging all job activity:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Oban.Telemetry.attach_default_logger(events: ~w(notifier peer stager)a)
</code></pre>
<p>Along with filtering, there are new events to make diagnosing operational problems easier.</p>
<p>A <code>peer:election</code> events logs leadership changes to indicate when nodes gain or lose leadership. Leadership issues are rare, but insidious, and make diagnosing production problems especially tricky.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
  message: "peer became leader",
  source: "oban",
  event: "peer:election",
  node: "worker.1",
  leader: true,
  was_leader: false
]
</code></pre>
<p>Helpfully, <code>plugin:stop</code> events are now logged for all core plugins via an optional callback, and <code>plugin:exception</code> events are logged for all plugins regardless of whether they implement the callback. Runtime information is logged for <code>Cron</code>, <code>Lifeline</code>, <code>Pruner</code>, <code>Stager</code>, and <code>Reindexer</code> plugins.</p>
<p>For example, every time <code>Cron</code> runs successfully it will output details about the execution time and all of the inserted job ids:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
  source: "oban",
  duration: 103,
  event: "plugin:stop",
  plugin: "Oban.Plugins.Cron",
  jobs: [1, 2, 3]
]
</code></pre>
<h2><a name="p-353186-official-json-4" class="anchor" href="#p-353186-official-json-4" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/sailboat.png?v=15" title=":sailboat:" class="emoji" alt=":sailboat:" loading="lazy" width="20" height="20"> Official JSON</h2>
<p>Oban will default to using the official <code>JSON</code> module built into Elixir v1.18+ when available.</p>
<p>A new <code>Oban.JSON</code> module detects whether the official Elixir <code>JSON</code> module is available at compile time. If it isn’t available, then it falls back to <code>Jason</code>, and if <code>Jason</code> isn’t available (which is extremely rare) then it warns about a missing module.</p>
<p>This approach was chosen over a config option for backward compatibility because Oban will only support the JSON module once the minimum supported Elixir version is v1.18.</p>
<h2><a name="p-353186-v2190-2025-01-16-5" class="anchor" href="#p-353186-v2190-2025-01-16-5" aria-label="Heading link" rel="nofollow"></a>v2.19.0 — 2025-01-16</h2>
<h3><a name="p-353186-enhancements-6" class="anchor" href="#p-353186-enhancements-6" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p>[Oban] Start all queues in parallel on initialization.</p>
<p>The midwife now starts queues using an async stream to parallelize startup and minimize boot time for applications with many queues. Previously,</p>
</li>
<li>
<p>[Oban] Safely return <code>nil</code> from <code>check_queue/2</code> when checking queues that aren’t running.</p>
<p>Checking on a queue that wasn’t currently running on the local node now returns <code>nil</code> rather than causing a crash. This makes it safer to check the whether a queue is running at all without a <code>try/catch</code> clause.</p>
</li>
<li>
<p>[Oban] Add <code>check_all_queues/1</code> to gather all queue status in a single function.</p>
<p>This new helper gathers the “check” details from all running queues on the local node. While it was previously possible to pull the queues list from config and call <code>check_queue/2</code> on each entry, this more accurately pulls from the registry and checks each producer concurrently.</p>
</li>
<li>
<p>[Oban] Add <code>delete_job/2</code> and <code>delete_all_jobs/2</code> operations.</p>
<p>This adds <code>Oban.delete_job/2</code>, <code>Oban.delete_all_jobs/2</code>, Engine callbacks, and associated operations for all native engines. Deleting jobs is now easier and safer, due to automatic state protections.</p>
</li>
<li>
<p>[Engine] Record when a queue starts shutting down</p>
<p>Queue producer metadata now includes a <code>shutdown_started_at</code> field to indicate that a queue isn’t just paused, but is actually shutting down as well.</p>
</li>
<li>
<p>[Engine] Add <code>rescue_jobs/3</code> callback for all engines.</p>
<p>The <code>Lifeline</code> plugin formerly used two queries to rescue jobs—one to mark jobs with remaining attempts as <code>available</code> and another that <code>discarded</code> the remaining stuck jobs. Those are now combined into a single callback, with the base definition in the <code>Basic</code> engine.</p>
<p>MySQL won’t accept a select in an update statement. The Dolphin implementation of <code>rescue_jobs/3</code> uses multiple queries to return the relevant telemetry data and make multiple updates.</p>
</li>
<li>
<p>[Cron] Introduce <code>Oban.Cron</code> with <code>schedule_interval/4</code></p>
<p>The new <code>Cron</code> module allows processes, namely plugins, to get cron-like scheduled functionality with a single function call. This will allow plugins to removes boilerplate around parsing, scheduling, and evaluating for cron behavior.</p>
</li>
<li>
<p>[Registry] Add <code>select/1 </code> to simplify querying for registered modules.</p>
</li>
<li>
<p>[Testing] Add <code>build_job/3</code> helper for easier testing.</p>
<p>Extract the mechanism for verifying and building jobs out of <code>perform_job/3</code> so that it’s usable in isolation. This also introduces <code>perform_job/2</code> for executing built jobs.</p>
</li>
<li>
<p>[Telemetry] Add information on leadership changes to <code>oban.peer.election</code> event.</p>
<p>An additional <code>was_leader?</code> field is included in <code>[:oban, :peer, :election | _]</code> event metadata to make hooking into leadership change events simpler.</p>
</li>
<li>
<p>[Telemetry] Add callback powered logging for plugin events.</p>
<p>Events are now logged for plugins that implement the a new optional callback, and exceptions are logged for all plugins regardless of whether they implement the callback.</p>
<p>This adds logging for <code>Cron</code>, <code>Lifeline</code>, <code>Pruner</code>, <code>Stager</code>, and <code>Reindexer</code>.</p>
</li>
<li>
<p>[Telemetry] Add peer election logging to default logger.</p>
<p>The default logger now includes leadership events to make identifying the leader, and leadership changes between nodes, easier.</p>
</li>
<li>
<p>[Telemetry] Add option to restrict logging to certain events.</p>
<p>Logging in a busy system may be noisy due to job events, but there are other events that are particularly useful for diagnosing issues. This adds an <code>events</code> option to <code>attach_default_logger/1</code> to allow selective event logging.</p>
</li>
<li>
<p>[Telemetry] Expose <code>default_handler_id/0</code> for telemetry testing.</p>
<p>Simplifies testing whether the default logger is attached or detached in application code.</p>
</li>
</ul>
<h3><a name="p-353186-chores-7" class="anchor" href="#p-353186-chores-7" aria-label="Heading link" rel="nofollow"></a>Chores</h3>
<ul>
<li>[Peer] The default database-backed peer was renamed from <code>Postgres</code> to <code>Database</code> because it is also used for MySQL databases.</li>
</ul>
<h3><a name="p-353186-bug-fixes-8" class="anchor" href="#p-353186-bug-fixes-8" aria-label="Heading link" rel="nofollow"></a>Bug Fixes</h3>
<ul>
<li>
<p>[Oban] Allow overwriting all <code>insert/*</code> functions arities after <code>use Oban</code>.</p>
</li>
<li>
<p>[Node] Correctly handle <code>:node</code> option for <code>scale_queue/2</code></p>
<p>Scoping <code>scale_queue/2</code> calls to a single node didn’t work as advertised due to some extra validation for producer meta compatibility.</p>
</li>
<li>
<p>[Migration] Fix version query for databases with non-unique <code>oid</code></p>
<p>Use <code>pg_catalog.obj_description(object_oid, catalog_name)</code>, introduced in PostgreSQL 7.2, to specify the <code>pg_class</code> catalog so only the <code>oban_jobs</code> description is returned.</p>
</li>
<li>
<p>[Pruner] Use state specific fields when querying for prunable jobs.</p>
<p>Using <code>scheduled_at</code> is not correct in all situations. Depending on job state,  one of <code>cancelled_at</code>, <code>discarded_at</code>, or <code>scheduled_at</code> should be used.</p>
</li>
<li>
<p>[Peer] Conditionally return the current node as leader for isolated peers.</p>
<p>Prevents returning the current node name when leadership is disabled.</p>
</li>
<li>
<p>[Testing] Retain time as microseconds for <code>scheduled_at</code> tests.</p>
<p>Include microseconds in the <code>begin</code> and <code>until</code> times used for scheduled_at tests with a delta. The prior version would truncate, which rounded the <code>until</code> down and broke microsecond level checks.</p>
</li>
<li>
<p>[Telemetry] Correct spelling of “elapsed” in <code>oban.queue.shutdown</code> metadata.</p>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="353186" data-batch-url="/posts/batch_likers">
                        9
                      </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/307">Post #306</a>
	                </div>
	            </div>
              <div id="likers-container-353186" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="353186"
                     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 #306"></div>
  </section>
</div>
    <div class="postbit" id="371464" data-post-id="371464">
  <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><a href="https://github.com/oban-bg/oban/releases/tag/v2.20.0" rel="noopener nofollow ugc">Oban v2.20.0</a> is out!</p>
<p>This release brings a fantastic new helper function, an optional migration to aid pruning, some stability improvements, and a bevy of documentation updates.</p>
<h2><a name="p-371464-update-job-1" class="anchor" href="#p-371464-update-job-1" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/butterfly.png?v=15" title=":butterfly:" class="emoji" alt=":butterfly:" loading="lazy" width="20" height="20"> Update Job</h2>
<p>This introduces the <code>Oban.update_job/2,3</code> function to simplify updating existing jobs while ensuring data consistency and safety. Previously, updating jobs required manually constructing change operations or complex queries that could lead to race conditions or invalid state changes.</p>
<p>Only a curated subset of job fields, e.g. <code>:args</code>, <code>:max_attempts</code>, <code>:meta</code>, etc. may be updated and they use the same validation rules as insertion to prevent invalid data. Updates are also wrapped in a transaction with locking clauses to prevent concurrent modifications.</p>
<p>The function supports direct map changes:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Oban.update_job(job, %{priority: 0, tags: ["urgent"]})
</code></pre>
<p>It also has a convenient function-based mode for dynamic changes:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Oban.update_job(job, fn job -&gt; 
  %{meta: Map.put(job.meta, "processed_by", current_node())} 
end)
</code></pre>
<h2><a name="p-371464-unique-state-groups-2" class="anchor" href="#p-371464-unique-state-groups-2" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/snowflake.png?v=15" title=":snowflake:" class="emoji" alt=":snowflake:" loading="lazy" width="20" height="20"> Unique State Groups</h2>
<p>There are now named unique state groups to replace custom state lists for unique jobs, promoting better uniqueness design and reducing configuration errors.</p>
<p>Previously, developers had to manually specify lists of job states for uniqueness, which was error-prone and could lead to subtle bugs when states were omitted or incorrectly combined. The new predefined groups ensure correctness and consistency across applications.</p>
<p>The new state groups are:</p>
<ul>
<li><strong><code>:all</code></strong> - All job states</li>
<li><strong><code>:incomplete</code></strong> - Jobs that haven’t finished (<code>~w(available scheduled executing retryable)a</code>)</li>
<li><strong><code>:scheduled</code></strong> - Only scheduled jobs (<code>[:scheduled]</code>)</li>
<li><strong><code>:successful</code></strong> - Jobs that completed successfully (<code>~w(available scheduled executing retryable completed)a</code>)</li>
</ul>
<p>These groups eliminate the risk of accidentally creating incomplete or incorrect state lists that could allow duplicate jobs to be created when they shouldn’t be, or prevent valid job creation when duplicates should be allowed.</p>
<h2><a name="p-371464-nested-plugin-supervision-3" class="anchor" href="#p-371464-nested-plugin-supervision-3" aria-label="Heading link" rel="nofollow"></a><img src="https://forum.elixirforum.com/images/emoji/apple/nest_with_eggs.png?v=15" title=":nest_with_eggs:" class="emoji" alt=":nest_with_eggs:" loading="lazy" width="20" height="20"> Nested Plugin Supervision</h2>
<p>Plugins and the internal Stager are now nested within a secondary supervision tree to improve system resilience and stability.</p>
<p>Previously, plugins were supervised directly under the main Oban supervisor alongside core process. This meant that plugin failures could potentially impact the entire Oban system, and frequent plugin restarts could trigger cascading failures in the primary supervision tree.</p>
<p>The new supervisor has more lenient restart limits to allow for more plugin restart attempts before giving up. This change makes Oban more robust in production environments where plugins may experience transient failures due to database or connectivity issues.</p>
<h2><a name="p-371464-v2200-2025-08-13-4" class="anchor" href="#p-371464-v2200-2025-08-13-4" aria-label="Heading link" rel="nofollow"></a>v2.20.0 — 2025-08-13</h2>
<h3><a name="p-371464-enhancements-5" class="anchor" href="#p-371464-enhancements-5" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p><code>Migration</code> Add V13 migration for indexing cancelled and discarded states.</p>
<p>A new V13 migration adds compound indexes to significantly improve <code>Oban.Plugins.Pruner</code> performance when cleaning up <code>discarded</code> and <code>cancelled</code> jobs. This is especially beneficial for applications that process large volumes of jobs and retain them for extended periods.</p>
</li>
<li>
<p><code>Repo</code> Expose dynamic repo switching as <code>with_dynamic_repo/2</code></p>
<p>The function was previously internal, which made impossible to use in external modules or extend upon. Now custom plugins and extensions can use <code>Repo.with_dynamic_repo/2</code> to use the configured dynamic repo options.</p>
</li>
</ul>
<h3><a name="p-371464-bug-fixes-6" class="anchor" href="#p-371464-bug-fixes-6" aria-label="Heading link" rel="nofollow"></a>Bug Fixes</h3>
<ul>
<li>
<p>[Oban] Allow <code>insert_all/1,3</code> via Oban facade</p>
<p>The <code>insert_all/1</code> and <code>insert_all/3</code> function variants were missing from the generated Oban facade functions when using a named instance.</p>
</li>
<li>
<p>[Testing] Generate correct <code>perform_job/1,2,3</code> clauses.</p>
<p>The <code>perform_job/2,3</code> clauses generated by <code>use Oban.Testing</code> didn’t handle the <code>perform_job/2</code> variant designed to run jobs created with <code>build_job/3</code>. This caused test failures when trying to execute jobs built using the <code>build_job/3</code> helper function.</p>
<p>The fix generates the missing <code>perform_job/2</code> clause along with a convenient <code>perform_job/1</code> variant, ensuring all testing scenarios work seamlessly regardless of how jobs are constructed.</p>
</li>
<li>
<p>[Testing] Restrict inline execution to <code>available</code> and <code>scheduled</code> states.</p>
<p>Jobs in the <code>completed</code> state or other non-runnable states were incorrectly attempted by the inline engine, potentially causing errors or unexpected behavior during testing.</p>
</li>
<li>
<p>[Worker] Disallow <code>:keys</code> when <code>:fields</code> doesn’t contain <code>:args</code> or <code>:meta</code></p>
<p>Unique job configurations using <code>:keys</code> were allowed even when <code>:fields</code> didn’t include <code>:args</code> or <code>:meta</code>, which would result in runtime errors since keys can only extract values from these keyable fields.</p>
</li>
<li>
<p>[Cron] Fix error message when the crontab has an invalid range.</p>
<p>Cron validation errors for invalid ranges were returning exception structs instead of readable error messages, making it difficult to understand and fix crontab configuration issues.</p>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371464" 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/309">Post #308</a>
	                </div>
	            </div>
              <div id="likers-container-371464" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371464"
                     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 #308"></div>
  </section>
</div>
    <div class="postbit" id="372873" data-post-id="372873">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Will oban be waiting for stable release of 1.19 elixir, or there will be a support for 1.19 rc?<br>
I am facing deadlock during 1.19rc compilation with oban. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372873" 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/310">Post #309</a>
	                </div>
	            </div>
              <div id="likers-container-372873" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372873"
                     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 #309"></div>
  </section>
</div>
    <div class="postbit" id="372923" data-post-id="372923">
  <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="apoorv-2204" data-post="310" 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/apoorv-2204/48/25991_2.png" class="avatar"> apoorv-2204:</div>
<blockquote>
<p>Will oban be waiting for stable release of 1.19 elixir, or there will be a support for 1.19 rc?<br>
I am facing deadlock during 1.19rc compilation with oban</p>
</blockquote>
</aside>
<p>There won’t be any changes to Oban for the Elixir v1.19 because the <a href="https://github.com/elixir-lang/elixir/issues/14709" rel="noopener nofollow ugc">deadlock was caused by a compiler issue</a>, and not anything Oban was doing. They’re working on it still, and it <a href="https://github.com/elixir-lang/elixir/pull/14693" rel="noopener nofollow ugc">should be fixed</a> with the next RC.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372923" data-batch-url="/posts/batch_likers">
                        3
                      </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/311">Post #310</a>
	                </div>
	            </div>
              <div id="likers-container-372923" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372923"
                     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 #310"></div>
  </section>
</div>
    <div class="postbit" id="372931" data-post-id="372931">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>the <a href="https://github.com/elixir-lang/elixir/issues/14709" rel="noopener nofollow ugc">deadlock was caused by a compiler issue</a>, and not anything Oban was doing. They’re working on it still, and it <a href="https://github.com/elixir-lang/elixir/pull/14693" rel="noopener nofollow ugc">should be fixed</a> with the next RC.</p>
</blockquote>
<p>You are very active in elixir community. <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"> <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"><br>
Thanks , kudos <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372931" 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/312">Post #311</a>
	                </div>
	            </div>
              <div id="likers-container-372931" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372931"
                     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 #311"></div>
  </section>
</div>
    <div class="postbit" id="376324" data-post-id="376324">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>hey, loving the changes. already used update_job.</p>
<p>the Unique State Groups got me confused though. here’s what i thought when i saw these groups initially, this is just for your reference on how a users thought process went:</p>
<ul>
<li>all: all (not confusing)</li>
<li>incomplete: executing, maybe retryable</li>
<li>scheduled: scheduled (not confusing)</li>
<li>successful: completed (how is ‘available’ or ‘scheduled’ or ‘executing’ completed?)</li>
</ul>
<p>the confusion is one issue, but actually i found myself still defining by specific states, because these groups don’t cover what i actually want to use this for:</p>
<ul>
<li>run all jobs again that had trouble (lets say i fixed a bug): retryable, discarded.</li>
<li>simple unique: everything but completed and discarded. this is what i use most often actually. i want jobs to keep running (uniquely), unless there’s a problem.</li>
<li>replace related: i have a job that runs periodically, but the user can run manually also. i don’t want them to be able to replace a job that’s executing or completed, in those cases scheduling a new one is fine. i mean ideal would be that it schedules when completed only and not even schedule when executing, but for my usecase either is fine.</li>
</ul>
<p>just thought i’d let you know how a laycoder thinks <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376324" 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/314">Post #313</a>
	                </div>
	            </div>
              <div id="likers-container-376324" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376324"
                     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 #313"></div>
  </section>
</div>
    <div class="postbit" id="376452" data-post-id="376452">
  <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="KristerV" data-post="314" 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/kristerv/48/13808_2.png" class="avatar"> KristerV:</div>
<blockquote>
<p>successful: completed (how is ‘available’ or ‘scheduled’ or ‘executing’ completed?)</p>
</blockquote>
</aside>
<p>The description for successful is “Jobs that aren’t <code>cancelled</code> or <code>discarded</code> (the default)”, which isn’t the most descriptive name, but it’s meant to be succinct (unlike <code>:everything_but_cancelled_or_discarded</code>).</p>
<p>It’s also the default, and doesn’t <em>need</em> to be explicitly stated in unique config.</p>
<aside class="quote no-group" data-username="KristerV" data-post="314" 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/kristerv/48/13808_2.png" class="avatar"> KristerV:</div>
<blockquote>
<p>the confusion is one issue, but actually i found myself still defining by specific states, because these groups don’t cover what i actually want to use this for:</p>
</blockquote>
</aside>
<p>That’s fine, provided you understand how uniqueness works, e.g. <a href="https://hexdocs.pm/oban/unique_jobs.html#uniqueness-vs-concurrency" rel="noopener nofollow ugc">concurrency vs uniqueness</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376452" 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/315">Post #314</a>
	                </div>
	            </div>
              <div id="likers-container-376452" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376452"
                     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 #314"></div>
  </section>
</div>
    <div class="postbit" id="382384" data-post-id="382384">
  <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>Forgot to post when <a href="https://github.com/oban-bg/oban/releases/tag/v2.20.2" rel="noopener nofollow ugc">Oban v2.20.2</a> was released!</p>
<h3><a name="p-382384-enhancements-1" class="anchor" href="#p-382384-enhancements-1" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p>[Telemetry] Add domain to <code>attach_default_logger</code> metadata</p>
<p>Although this information is present in the source attribute, it’s not part of the metadata, it’s part of the attributes. And when <code>encode = true</code>, it’s generated as a string, which makes it less convenient to work with.</p>
</li>
<li>
<p>[Cron] Add unique cron entry identifiers to job meta</p>
<p>A id value is generated for each cron entry and stored in the job’s meta to distinguish between different cron jobs with the same expression.</p>
</li>
</ul>
<h3><a name="p-382384-bug-fixes-2" class="anchor" href="#p-382384-bug-fixes-2" aria-label="Heading link" rel="nofollow"></a>Bug Fixes</h3>
<ul>
<li>
<p>[Stager] Order staging query to maximize compound index usage</p>
<p>The core compound index couldn’t be utilized by staging queries when the planner estimated a large number of hits. Changing the query to order by <code>scheduled_at</code> and <code>id</code>, it becomes an index scan.</p>
<p>It would still be more efficient to use a dedicated index, but OSS doesn’t have any mechanisms for automatic concurrent index creation and we have to save it for later.</p>
</li>
<li>
<p>[Executor] Take measurements from the executing process</p>
<p>When Producer starts jobs, it calls <code>Executor.new</code> in its own process, before handing it off to <code>Task.Supervisor.async_nolink</code> to call <code>Executor.call</code>. That means it used the Producer <code>pid</code>, and took measurements from that process.</p>
</li>
<li>
<p>[Oban] Set <code>scheduled</code> state correctly when updating with <code>update_job/3</code></p>
<p>When the <code>scheduled_at</code> timestamp is set during <code>update_job</code>, the state is automatically set to <code>scheduled</code>. This mirrors the functionality of <code>insert_job</code>.</p>
<p>Note that the value of the timestamp isn’t considered. Setting a timestamp in the past will set the job as <code>scheduled</code>. This isn’t a problem in practice because the stager will change the state to <code>available</code> on the next cycle anyhow.</p>
</li>
<li>
<p>[Repo] Include <code>:deadlock_detected</code> in expected errors</p>
<p>Deadlocks are automatically resolved by Postgres because it aborts one transaction. At that point, the retry should succeed quickly since the blocking transaction is gone.</p>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382384" 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/316">Post #315</a>
	                </div>
	            </div>
              <div id="likers-container-382384" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382384"
                     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 #315"></div>
  </section>
</div>
    <div class="postbit" id="382385" data-post-id="382385">
  <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><a href="https://github.com/oban-bg/oban/releases/tag/v2.20.3" rel="noopener nofollow ugc">Oban v2.20.3</a> is also out!</p>
<h3><a name="p-382385-enhancements-1" class="anchor" href="#p-382385-enhancements-1" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p>[Worker] Allow snoozing jobs by returning a tuple period</p>
<p>It’s now possible to snooze jobs with a period such as <code>{1, :minute}</code> instead of just a raw number of seconds.</p>
</li>
<li>
<p>[Oban] Validate no duplicate options are passed to config on init</p>
<p>Because options are provided as a keyword list, duplicate options were accepted while only one was actually used.</p>
</li>
</ul>
<h3><a name="p-382385-bug-fixes-2" class="anchor" href="#p-382385-bug-fixes-2" aria-label="Heading link" rel="nofollow"></a>Bug Fixes</h3>
<ul>
<li>
<p>[Oban] Fix starting a queue on a specific node</p>
<p>The <code>:node</code> option was incorrectly preserved when starting a queue, which would crash it. Now the <code>:node</code> is dropped after scoping the start signal.</p>
</li>
<li>
<p>[Reindexer] Fix dropping invalid indexes from the reindexer</p>
<p>The reindexer would fail sliently with “DROP INDEX CONCURRENTLY” cannot be executed from a function message because the deindex operation used a <code>DO</code> block to loop through and drop invalid indexes, but PostgreSQL prohibits <code>CONCURRENTLY</code> operations inside functions or DO blocks. Now invalid indexes are fetched first, then dropped as individual queries.</p>
</li>
<li>
<p>[Installer] Prevent installer crash with unsupported adapters</p>
<p>The installer would crash with a <code>CaseClauseError</code> when a project had an Ecto repo using an unsupported adapter like <code>Ecto.Adapters.Tds</code>.</p>
<p>Now the installer filters repos to find one with a supported adapter, skipping unsupported ones automatically. Without a compatible repo, it displays an error message listing the found repos and their adapters, along with guidance on how to specify a repo explicitly.</p>
</li>
<li>
<p>[Pruner] Better sqlite timestamp default and pruning query</p>
<p>The <code>CURRENT_TIMESTAMP</code> type lacks a trailing <code>z</code>, which causes it to be compared incorrectly against UTC datetimes. Any jobs inserted without a <code>scheduled_at</code>, where the default is used, could be returned in queries that compare against a <code>DateTime</code>.</p>
<p>This prevents the issue in the future two ways:</p>
<ol>
<li>Switch the default <code>inserted_at/scheduled_at</code> timestamp to a format that can be queried properly.</li>
<li>Change the pruning check to use <code>completed_at</code> rather than <code>scheduled_at</code> for existing databases. This is a more accurate query that was avoided before because it didn’t match the <code>Basic</code> engine.</li>
</ol>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382385" data-batch-url="/posts/batch_likers">
                        3
                      </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/317">Post #316</a>
	                </div>
	            </div>
              <div id="likers-container-382385" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382385"
                     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 #316"></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=32">Load more posts (1 remaining)</a>
</div></template></turbo-stream>