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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/mbuhot" rel="nofollow">@mbuhot</a> This is awesome. 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="121884" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-121884" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121884"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="121901" data-post-id="121901">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Very cool. Thanks for sharing this project.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="121901" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-121901" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="121901"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="128681" data-post-id="128681">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mbuhot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mbuhot/120/33444_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mbuhot
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><code>EctoJob</code> version 2.1.0 has been released.</p>
<p>Version 2.1 adds support for requeing jobs, fixes to the job reservation algorithm and dialyzer warnings.</p>
<p><a href="https://github.com/mbuhot/ecto_job/blob/master/CHANGELOG.md#210" rel="noopener nofollow ugc">Changelog</a><br>
<a href="https://hex.pm/packages/ecto_job/2.1.0" rel="nofollow">Hex Package </a><br>
<a href="https://hexdocs.pm/ecto_job/2.1.0/readme.html" rel="noopener nofollow ugc">Docs </a></p>
<p>Thank you to everyone that contributed to this version!</p>
<p>I’d also like to invite any users of EctoJob to please raise issues on the GitHub page for any features you’d like to see added or would be willing to work on (admin UI, Telemetry, Pre/Post job hooks, etc..)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="128681" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-128681" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="128681"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="179385" data-post-id="179385">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi,</p>
<p>The library is very good and works fine for my delayed email sending functionality. But I am facing a problem, when I add the child worker in supervisor tree, like this</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def start(_type, _args) do

    # List all child processes to be supervised

    children = [

      # Start the Ecto repository

      MyApp.Repo,

      # Start the Endpoint (http/https)

      MyAppWeb.Endpoint,


      {MyApp.JobQueue, repo: MyApp.Repo, max_demand: 100},

      {Task.Supervisor, [name: MyApp.TaskSupervisor]}

    ]
</code></pre>
<p>I am unable to run any tests. Getting the error like this<br>
I am getting the error</p>
<p>** (DBConnection.OwnershipError) cannot find ownership process for <a class="hashtag-cooked" href="/tag/pid/2279" data-type="tag" data-slug="pid" data-id="2279" 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>pid</span></a>&lt;0.847.0&gt;.</p>
<p>When using ownership, you must manage connections in one<br>
of the four ways:</p>
<ul>
<li>By explicitly checking out a connection</li>
<li>By explicitly allowing a spawned process</li>
<li>By running the pool in shared mode</li>
<li>By using :caller option with allowed process</li>
</ul>
<p>The first two options require every new process to explicitly<br>
check a connection out or be allowed by calling checkout or<br>
allow respectively.</p>
<p>The third option requires a {:shared, pid} mode to be set.<br>
If using shared mode in tests, make sure your tests are not<br>
async.</p>
<p>The fourth option requires [caller: pid] to be used when<br>
checking out a connection from the pool. The caller process<br>
should already be allowed on a connection.</p>
<p>If you are reading this error, it means you have not done one<br>
of the steps above or that the owner process has crashed.</p>
<p>See Ecto.Adapters.SQL.Sandbox docs for more information.<br>
(ecto_sql 3.3.3) lib/ecto/adapters/sql.ex:609: Ecto.Adapters.SQL.raise_sql_call_error/1<br>
(ecto_sql 3.3.3) lib/ecto/adapters/sql.ex:545: Ecto.Adapters.SQL.execute/5<br>
(ecto 3.3.2) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4<br>
(ecto_job 3.0.0) lib/ecto_job/producer.ex:184: EctoJob.Producer.dispatch_jobs/2<br>
(gen_stage 0.14.3) lib/gen_stage.ex:2103: GenStage.noreply_callback/3<br>
(stdlib 3.11.1) gen_server.erl:637: :gen_server.try_dispatch/4<br>
(stdlib 3.11.1) gen_server.erl:711: :gen_server.handle_msg/6<br>
(stdlib 3.11.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3<br>
Last message: {:DOWN, <a class="hashtag-cooked" href="/tag/reference/1562" data-type="tag" data-slug="reference" data-id="1562" 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>reference</span></a>&lt;0.1630123645.3685482498.192412&gt;, :process, <a class="hashtag-cooked" href="/tag/pid/2279" data-type="tag" data-slug="pid" data-id="2279" 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>pid</span></a>&lt;0.847.0&gt;, {%DBConnection.OwnershipError{message: “cannot find ownership process for <a class="hashtag-cooked" href="/tag/pid/2279" data-type="tag" data-slug="pid" data-id="2279" 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>pid</span></a>&lt;0.847.0&gt;.\n\nWhen using ownership, you must manage connections in one\nof the four ways:\n\n* By explicitly checking out a connection\n* By explicitly allowing a spawned process\n* By running the pool in shared mode\n* By using :caller option with allowed process\n\nThe first two options require every new process to explicitly\ncheck a connection out or be allowed by calling checkout or\nallow respectively.\n\nThe third option requires a {:shared, pid} mode to be set.\nIf using shared mode in tests, make sure your tests are not\nasync.\n\nThe fourth option requires [caller: pid] to be used when\nchecking out a connection from the pool. The caller process\nshould already be allowed on a connection.\n\nIf you are reading this error, it means you have not done one\nof the steps above or that the owner process has crashed.\n\nSee Ecto.Adapters.SQL.Sandbox docs for more information.”}, [{Ecto.Adapters.SQL, :raise_sql_call_error, 1, [file: ‘lib/ecto/adapters/sql.ex’, line: 609]}, {Ecto.Adapters.SQL, :execute, 5, [file: ‘lib/ecto/adapters/sql.ex’, line: 545]}, {Ecto.Repo.Queryable, :execute, 4, [file: ‘lib/ecto/repo/queryable.ex’, line: 192]}, {EctoJob.Producer, :dispatch_jobs, 2, [file: ‘lib/ecto_job/producer.ex’, line: 184]}, {GenStage, :noreply_callback, 3, [file: ‘lib/gen_stage.ex’, line: 2103]}, {:gen_server, :try_dispatch, 4, [file: ‘gen_server.erl’, line: 637]}, {:gen_server, :handle_msg, 6, [file: ‘gen_server.erl’, line: 711]}, {:proc_lib, :init_p_do_apply, 3, [file: ‘proc_lib.erl’, line: 249]}]}}</p>
<p>I have tried many ways to resolve this, but unable to succeed.</p>
<p>Please help me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="179385" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-179385" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="179385"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="179396" data-post-id="179396">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mbuhot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mbuhot/120/33444_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mbuhot
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/santoshbt" rel="nofollow">@santoshbt</a></p>
<p>Take a look at this github issue: <a href="https://github.com/mbuhot/ecto_job/issues/36" class="inline-onebox" rel="noopener nofollow ugc">pg_notify not working when testing · Issue #36 · mbuhot/ecto_job · GitHub</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="179396" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-179396" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="179396"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="179921" data-post-id="179921">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi,</p>
<p>It was accidentally jobs table is deleted from my local database. I am unable to re-run the migration.<br>
It always gives the error<br>
execute “CREATE FUNCTION fn_notify_inserted()\n  RETURNS trigger AS $$\nDECLARE\nBEGIN\n  PERFORM pg_notify(TG_TABLE_NAME, ‘’);\n  RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql\n”<br>
** (Postgrex.Error) ERROR 42723 (duplicate_function) function “fn_notify_inserted” already exists with same argument types.</p>
<p>Please let me know how to handle it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="179921" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-179921" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="179921"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="179956" data-post-id="179956">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mbuhot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mbuhot/120/33444_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mbuhot
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/santoshbt" rel="nofollow">@santoshbt</a> use the postgresql <a href="https://www.postgresql.org/docs/current/sql-dropfunction.html" rel="noopener nofollow ugc">drop function</a> command to remove the function before running the migration.<br>
the CASCADE option will also remove any triggers that depend on that function.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="179956" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-179956" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="179956"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="189450" data-post-id="189450">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mbuhot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mbuhot/120/33444_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mbuhot
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>EctoJob version 3.1 has been released <img src="https://forum.elixirforum.com/images/emoji/apple/tada.png?v=15" title=":tada:" class="emoji" alt=":tada:" loading="lazy" width="20" height="20"></p>
<p><a href="https://github.com/mbuhot/ecto_job/blob/master/CHANGELOG.md#310" rel="noopener nofollow ugc">Changelog </a><br>
<a href="https://hex.pm/packages/ecto_job/3.1.0" rel="nofollow">Hex Package </a><br>
<a href="https://hexdocs.pm/ecto_job/3.1.0/readme.html" rel="noopener nofollow ugc">Docs </a></p>
<p>Version 3.1.0 adds support for MySQL 8 and storing job params as an Elixir/Erlang term.<br>
You can insert any arbitrary Elixir/Erlang term into the queue:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">{"SendEmail", "jonas@gmail.com", "Welcome!"} 
|&gt; MyApp.JobQueue.new() 
|&gt; MyApp.Repo.insert()
</code></pre>
<p>You should use the option  <code>:params_type</code>  when defining your queue module:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyJobQueue do 
  use EctoJob.JobQueue, table_name: "jobs", params_type: :binary # ... 
end
</code></pre>
<p>Possible values of the option are:  <code>:map</code>  (default) and  <code>:binary</code>  (for storing Elixir/Erlang terms).</p>
<p>You should use the same option when setting up the migration:</p>
<pre data-code-wrap="elixlir"><code class="lang-elixlir">@ecto_job_version 3 
def up do 
  EctoJob.Migrations.Install.up() 
  EctoJob.Migrations.up("jobs", version: @ecto_job_version, params_type: :binary) 
end 
</code></pre>
<p>We are looking forward to releasing a new major version soon with support for completed job retention and job idempotency. Stay tuned <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="189450" data-batch-url="/posts/batch_likers">
                        5
                      </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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-189450" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189450"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="337439" data-post-id="337439">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Is it expected that each queue creates a new DB connection independent of the connection pool maintained by Ecto? It is how I see EctoJob behave in our production and it seems very weird to me. So in effect there is pool_size + number_of_queues connections.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="337439" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-337439" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="337439"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="337485" data-post-id="337485">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mbuhot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mbuhot/120/33444_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mbuhot
                    <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>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes a dedicated connection is required to listen for notifications of new jobs in each queue table. (at <a href="https://github.com/mbuhot/ecto_job/blob/v3.1.0/lib/ecto_job/supervisor.ex#L55" class="inline-onebox" rel="noopener nofollow ugc">ecto_job/lib/ecto_job/supervisor.ex at v3.1.0 · mbuhot/ecto_job · GitHub</a>)</p>
<p>The Ecto APIs like <a href="https://hexdocs.pm/ecto/Ecto.Repo.html#c:checkout/2" rel="noopener nofollow ugc">Repo.checkout</a> only allows a connection to be checked out for the duration of a function call, so EctoJob requires an additional connection.</p>
<blockquote>
<p>it seems very weird to me</p>
</blockquote>
<p>How so?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="337485" 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/ectojob-a-transactional-job-queue-built-with-ecto-postgresql-and-genstage/11771/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-337485" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="337485"
                     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 #20"></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/11771/load_more?page=3">Load more posts (2 remaining)</a>
</div></template></turbo-stream>