title: Laravel beanstalkd queue repeating jobs before retry time
body: <p>I've configured a queuing on Laravel 5.4 using the "beanstalkd" queue driver ... I deployed it on CentOS 7 (cPanel) and installed <a href="http://supervisord.org/introduction.html" rel="nofollow noreferrer">Supervisor</a>... but I've two main problems</p>
  
  <ol>
  <li><p>In the logs, I found this exception "local.ERROR: exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table '{dbname}.failed_jobs' doesn't exist" So <strong>Question #1</strong> is .. Should I configure any database tables for "beanstalkd" queue driver, If so could you please state these tables structure?</p></li>
  <li><p>Also I've configured the queue:work command in the Supervisor config file as following</p></li>
  </ol>
  
  <blockquote>
  <pre><code>[program:test-queue]
  process_name=%(program_name)s_%(process_num)02d
  command=php /home/****/****/artisan queue:work beanstalkd --sleep=3 --tries=3
  autostart=true
  autorestart=true
  user=gcarpet
  numprocs=8
  redirect_stderr=true
  stdout_logfile= /home/*****/*****/storage/logs/supervisor.log
  </code></pre>
  </blockquote>
  
  <ol start="3">
  <li><p>I found that the supervisor.log contained multiple calls for the job even after the first call was "Processed" .. <strong>Question #2</strong> I dispatched the job once but the job was pushed in to the queue several times, I need a solution for this problem I don't want the same job to pushed multiple times in the queue?</p>
  
  <blockquote>
  <pre><code>[2019-05-14 09:08:15] Processing: App\Jobs\{JobName}
  [2019-05-14 09:08:15] Processing: App\Jobs\{JobName}
  [2019-05-14 09:08:15] Failed:     App\Jobs\{JobName}
  [2019-05-14 09:08:24] Processed:  App\Jobs\{JobName}
  [2019-05-14 09:08:24] Processing: App\Jobs\{JobName}
  [2019-05-14 09:08:33] Processed:  App\Jobs\{JobName}
  [2019-05-14 09:08:33] Processing: App\Jobs\{JobName}
  [2019-05-14 09:08:41] Processed:  App\Jobs\{JobName}
  [2019-05-14 09:08:41] Processing: App\Jobs\{JobName}
  [2019-05-14 09:08:41] Failed:     App\Jobs\{JobName}
  </code></pre>
  </blockquote>
  
  <ol start="4">
  <li>Please note the time difference between processed and failed jobs, Also I had set the driver 'retry_after' to 900 once and to 90 another time .. And I didn't feel it made any difference.</li>
  </ol></li>
  </ol>