Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Add initial resume_at date support to HaystackBuilder #83

Merged
merged 1 commit into from
May 14, 2024

Conversation

viicslen
Copy link
Contributor

@viicslen viicslen commented Oct 30, 2023

Added a new method pausedUntil() that allows setting an initial resume_at date when building a Haystack. This can be used to set a longer initial delay if you are using Amazon SQS (which has a max delay of 15 minutes)

use Sammyjo20\LaravelHaystack\Models\Haystack;

// ...

Haystack::build()
        ->addJob(new NameJob('Sam'))
        ->pausedUntil(now()->addDays(5))
        ->dispatch();

Added a new method `pausedUntil()` that allows setting an initial `resume_at` date when building a Haystack. The ability to do so is useful to mandate a delay before the Haystack resumes processing. Also updated the HaystackBuilderTest to demonstrate this new feature.
Copy link
Owner

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition, thank you so much and very sorry for the delay!

@Sammyjo20 Sammyjo20 merged commit 4d933d8 into Sammyjo20:main May 14, 2024
8 of 9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants