title: Laravel jobs being processed but not doing anything
body: <p>I have checked multiple answers regarding this issue but didn't seem to have a proper solution. I'm firing a job, and it's working well in <code>sync</code> mode, but not working at all in <code>database</code> driver.</p>
  <p>queue.php</p>
  <pre><code>'default' =&gt; env('QUEUE_CONNECTION', 'sync'),
  </code></pre>
  <p>.env</p>
  <pre><code>QUEUE_DRIVER=database
  </code></pre>
  <p>How i'm firing the job. I tried removing <code>onConnection('database')</code> but it would run on <code>sync</code> driver instead</p>
  <pre><code>SendNotifications::dispatch(array(&quot;message&quot; =&gt; &quot;test&quot;))-&gt;onConnection('database');
  </code></pre>
  <p>I'm executing the following command to listen</p>
  <pre><code>php artisan queue:work database
  </code></pre>
  <p>When I'm firing the job, it gets written in the <code>jobs</code> table, after a few seconds, it gets <code>processed</code>. The problem is: It's not firing. If I remove the <code>onConnection('database')</code> it works on <code>sync</code> mode without any issues.</p>
  <pre><code>class SendNotifications implements ShouldQueue {
  
   public function __construct(){
   }
  
  public function handle(){
     // here i'm connecting to a notifications api
   }
  
  }
  </code></pre>
  <p>Example of what's inside <code>handle()</code></p>
  <pre><code>if($this-&gt;event_name === &quot;example&quot;){
              $room = $this-&gt;getRoomByID($example_id_variable); // database_call
              if(empty($room) === true) {
                return;
              }
              $notify_receivers = getBlabla(); //get the receivers from the database (complex query)
              if(empty($notify_receivers) === false){
                foreach($notify_receivers as $receiver){
                  $this-&gt;sendMessageAPI($receiver, $this-&gt;payload);
                }
              }
            }
  </code></pre>
  <p>sentMessageAPI</p>
  <pre><code>public function sendMessageAPI($id, $payload) {
      $curl = curl_init();
  
      $post_fields = array(
          &quot;key&quot; =&gt; &quot;key&quot;,
          &quot;secret&quot; =&gt; &quot;secret&quot;,
          &quot;channelId&quot; =&gt; $id,
          &quot;message&quot; =&gt; $payload
      );
      curl_setopt_array($curl, array(
          CURLOPT_URL =&gt; &quot;https://www.piesocket.com/api/publish&quot;,
          CURLOPT_RETURNTRANSFER =&gt; true,
          CURLOPT_CUSTOMREQUEST =&gt; &quot;POST&quot;,
          CURLOPT_POSTFIELDS =&gt; json_encode($post_fields),
          CURLOPT_HTTPHEADER =&gt; array(
              &quot;Content-Type: application/json&quot;
          ),
      ));
  
      $response = curl_exec($curl);
  }
  </code></pre>
  <p>I'm running this on a localhost using xampp. Any ideas why it's not actually firing? I've checking the <code>payload</code> column in the database table <code>jobs</code> and it's correct.</p>