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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/outlog" rel="nofollow">@outlog</a> indeed, currently there’s no guarantee when it comes to job order. Nice suggestion for a future release, thanks!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20635" 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/jumbo-new-job-queueing-library/3170/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-20635" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20635"
                     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="20640" data-post-id="20640">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/fishcakez" rel="nofollow">@fishcakez</a> thank you for great and deep review. Wow!</p>
<p>I am aware of these limitations. I had to write this library because I quickly needed some replacement for exq/toniq due to some fu***up in one project where we needed to reprocess tens of thousands of files and none of the alternatives were reliable enough to at least reach half of the queue…</p>
<p>So while I agree that there are some corner cases that might affect queue behaviour, they are, well, 1% of cases that I wasn’t intending to cover in the very first release, which does not mean they won’t be improved in the future releases. In real life, in most of the apps jobs are not things that affect the process tree, they are rather simple tasks, such as sending mails, processing some data etc. It is highly unlikely that someone will  call <code>exit(:normal)</code> in a job. Perfect Library should obviously handle such cases but I was time constrained so I wanted to make Good Enough For 99% Cases Library. At least for 1.0.0.</p>
<p>According to my own experience even now Jumbo is way more stable and faster than Exq/Toniq so it fits into Good Enough principle <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>
<p>Callbacks are on the TODO list.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20640" 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/jumbo-new-job-queueing-library/3170/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-20640" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20640"
                     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="20645" data-post-id="20645">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fishcakez" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fishcakez/120/12081_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fishcakez
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Ecto Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think you should handle the first issue even if you ignore the rest. That is the assumption that an exit of the form <code>{_, _}</code> is an exception. This is an invalid assumption and will catch many <code>exit/1</code> calls that are far from edge cases. Formatting errors incorrectly when we have the <code>Exception</code> is inexcusable.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20645" 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/jumbo-new-job-queueing-library/3170/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-20645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20645"
                     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="20647" data-post-id="20647">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/fishcakez" rel="nofollow">@fishcakez</a> let me clarify, so I am sure that I understand you correctly.</p>
<p>When you write about <code>{_,_}</code> you mean improper callback handler in  <a href="https://github.com/mspanc/jumbo/blob/bfed4e62b2dc432e7c150f886ecf1565bb51991c/lib/jumbo/queue.ex#L277" class="inline-onebox" rel="noopener nofollow ugc">jumbo/lib/jumbo/queue.ex at bfed4e62b2dc432e7c150f886ecf1565bb51991c · mspanc/jumbo · GitHub</a>, right?</p>
<p>When you write about formatting, you mean using <a href="http://elixir-lang.org/docs/v1.3/elixir/Exception.html#format/3" rel="nofollow">http://elixir-lang.org/docs/v1.3/elixir/Exception.html#format/3</a> and similar functions, right?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20647" 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/jumbo-new-job-queueing-library/3170/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-20647" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20647"
                     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="20651" data-post-id="20651">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fishcakez" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fishcakez/120/12081_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fishcakez
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Ecto Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I meant specifically the pattern on this line: <a href="https://github.com/mspanc/jumbo/blob/bfed4e62b2dc432e7c150f886ecf1565bb51991c/lib/jumbo/queue.ex#L317" class="inline-onebox" rel="noopener nofollow ugc">jumbo/lib/jumbo/queue.ex at bfed4e62b2dc432e7c150f886ecf1565bb51991c · mspanc/jumbo · GitHub</a> and the other <code>:DOWN</code> patterns (but they are being handled ok). We have <code>Exception.format_exit(reason)</code> or <code>Exception.format({:EXIT, pid}, reason)</code> that you should use to format the <code>reason</code> from the <code>:DOWN</code> tuple.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20651" 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/jumbo-new-job-queueing-library/3170/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-20651" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20651"
                     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="20653" data-post-id="20653">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fishcakez" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fishcakez/120/12081_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fishcakez
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Ecto Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh I just realise that other <code>:DOWN</code> reasons are not handled! <code>reason</code> can be any term!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20653" 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/jumbo-new-job-queueing-library/3170/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-20653" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20653"
                     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="20656" data-post-id="20656">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Ok now I get it, thanks!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20656" 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/jumbo-new-job-queueing-library/3170/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-20656" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20656"
                     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="20668" data-post-id="20668">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sasajuric" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/120/991_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sasajuric
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Elixir In Action</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Membrane-Core-Team" data-username="mspanc" data-post="11" data-topic="3170">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mspanc/48/2877_2.png" class="avatar"> mspanc:</div>
<blockquote>
<p>However, if time will allow I will add some persistency mechanisms but they will be optional.</p>
</blockquote>
</aside>
<p>I believe you might be able to delegate persistency, as well as restarting of failed jobs, to library users by supporting callbacks. If you invoke a custom callback function when the job is about to be started, and after it finishes or crashes, it would give users the chance to store job state into an arbitrary database, and/or requeue jobs if they crash.</p>
<p>That would keep the job queue logic pretty simple, and yet provide a lot of flexibility.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="20668" 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/jumbo-new-job-queueing-library/3170/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-20668" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="20668"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>