saving tasks only if there are any in Queue.php