Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Long Running Tasks Laravel Package

spatie/laravel-long-running-tasks

Monitor externally executed long-running tasks in Laravel (e.g., AWS Rekognition) by polling for status. Define tasks with a check() method returning ContinueChecking or StopChecking, store metadata, and run checks on a configurable interval until completion.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development: Enables asynchronous processing of external API tasks (e.g., AWS Rekognition, video encoding, or batch data processing) without blocking HTTP responses, improving user experience and system responsiveness.
  • Roadmap Alignment: Critical for scaling APIs or services requiring polling-based workflows (e.g., file processing, AI model inference, or third-party integrations with delayed responses).
  • Build vs. Buy: Avoids reinventing polling logic, task state management, and retry mechanisms, reducing development time and technical debt.
  • Use Cases:
    • Media Processing: Polling for video/audio encoding completion (e.g., FFmpeg, AWS MediaConvert).
    • AI/ML Workflows: Tracking long-running model predictions or data transformations.
    • Third-Party APIs: Managing external services with non-webhook-based status updates (e.g., payment processing, CRM syncs).
    • Background Jobs: Offloading CPU-intensive tasks from the main request flow (e.g., report generation, data migrations).

When to Consider This Package

  • Adopt When:

    • Your Laravel app interacts with external services requiring polling for task completion (no webhooks).
    • You need reliable task state tracking (e.g., pending, processing, failed, completed) with automatic retries.
    • Long-running tasks risk timeout errors in HTTP requests (e.g., >30 seconds).
    • You want to decouple task execution from the user request flow (e.g., return a 202 Accepted immediately).
    • Your team lacks expertise in building custom polling/retry logic for external APIs.
  • Look Elsewhere If:

    • Your tasks are fully internal (use Laravel Queues or Jobs instead).
    • The external service supports webhooks (use spatie/laravel-webhooks or similar).
    • You need distributed task orchestration (e.g., Kubernetes, AWS Step Functions) beyond Laravel’s scope.
    • Tasks require human intervention (use workflow tools like Temporal or Camunda).
    • Your stack is non-PHP/Laravel (e.g., Node.js, Python).

How to Pitch It (Stakeholders)

For Executives:

*"This package solves a critical scalability bottleneck: long-running external tasks (e.g., video processing, AI inference) that currently block HTTP responses or require manual polling. By integrating spatie/laravel-long-running-tasks, we can:

  • Improve UX: Return instant 202 Accepted responses while tasks run asynchronously.
  • Reduce Errors: Automate retries and state tracking for flaky external APIs (e.g., AWS Rekognition).
  • Save Dev Time: Avoid building custom polling logic, which is error-prone and hard to maintain.
  • Future-Proof: Supports our roadmap for media processing, AI workflows, and third-party integrations. Cost: Minimal (MIT-licensed, open-source). ROI: Faster feature delivery and fewer production incidents."*

For Engineering:

*"This package provides a batteries-included solution for managing external polling-based tasks in Laravel. Key benefits:

  • Out-of-the-box polling: Handles pending/processing states with configurable retry logic.
  • Task lifecycle management: Tracks TaskResult (success/failure) and integrates with Laravel’s queue system.
  • Extensible: Customize polling intervals, failure thresholds, and task models via events/observers.
  • Lightweight: ~500 LOC, no external dependencies beyond Laravel. Trade-offs: Limited to Laravel/PHP; not a replacement for distributed workflows (e.g., Temporal).* Proposal: Pilot with [high-impact use case, e.g., video encoding] to validate before wider adoption."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport