⚡
Laravel Haystack
View Code On GithubEdit Docs
  • 🎯Getting Started
    • Introduction
    • How It Works
    • Installation
    • Usage
    • Configuration
    • Callback Events
  • 🛰️Cool Features
    • Shared Data
    • Shared Models
    • Long Delays & Pauses
    • Appending & Prepending Jobs
    • Chunking Jobs
  • 🗺️Next Up
    • Allowing Failed Jobs
    • Global Middleware
    • Connection, Queue & Delay
    • Naming Haystacks
    • Before Saving Hook
    • Custom Options
  • 🧼Cleanup
    • Deleting Stale Haystacks
    • Deleting Specific Haystacks
    • Clearing All Haystacks
  • 🛣️Finish
    • Support
    • Star On Github
    • Edit Documentation
Powered by GitBook
On this page
  1. Next Up

Allowing Failed Jobs

The default behaviour of Haystack is to cancel the Haystack if one of the jobs in the chain fails. If you would like to continue processing the rest of the Haystack even if there was a failure, use the allowFailures option when building a Haystack.

<?php

$haystack = Haystack::build()
   ->addJob(new RecordPodcast) 
   ->addJob(new ProcessPodcast)
   ->allowFailures()
   ->dispatch();

When jobs fail they will be added to your failed_jobs database table.

PreviousChunking JobsNextGlobal Middleware

Last updated 2 years ago

🗺️