Configuration
Laravel Haystack provides various configuration options, altering default package behaviour that you may find useful for your application. These can be changed in the config/haystack.php
file.
Return All Haystack Data When Finished
When this option is set to true
, Laravel Haystack will query all the haystack data rows from the database and include them in the then
/finally
/catch
callbacks as a Laravel collection upon completion of the job processing:
Process Automatically
This configuration determines whether Laravel Haystack should automatically queue Stackable
jobs after each job is processed. If set to false
, you will need to manually call $this->nextJob
inside your jobs:
Keep Stale Haystacks for Days
Defines the duration (in days) for which "stale" haystacks are retained. Stale haystacks are those where the controlling job has failed without sending the failure signal to laravel-haystack.
Delete Finished Haystacks
Determines whether Laravel Haystack should automatically delete haystacks after they have finished processing. If set to false
, ensure to use the scheduled command to clean up old finished haystacks.
Keep Finished Haystacks for Days
Specifies the duration (in days) for which finished haystacks will be retained. This is only applicable if delete_finished_haystacks
is set to false
.
Database Connection
Specifies the database connection used to store haystack jobs. The default value is retrieved from the HAYSTACK_DB_CONNECTION
environment variable, falling back to the default database connection specified in your Laravel configuration (DB_CONNECTION
).
Last updated