goody-tech/laravel-sync-batch

laravel-sync-batch

Maintainers

Package info

github.com/goody-system/laravel-sync-batch

pkg:composer/goody-tech/laravel-sync-batch

Statistics

Installs: 4 368

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0 2026-03-18 08:09 UTC

This package is not auto-updated.

Last update: 2026-04-01 08:19:24 UTC


README

親バッチ

ParallelBatch::runningParallelBatch(function ($master_id) {
            //子バッチ
            ParallelBatch::createChildBatch(
                $master_id
                , 'app:child'
                , '--prm1=500 --prm2=200'
            );

            ParallelBatch::createChildBatch(
                $master_id
                , 'app:child'
                , '--prm1=501 --prm2=201'
            );

        });

子バッチ

protected $signature = 'app:child {--process_id=}';

    public function handle()
    {
        try {
            /**
             * your process
             */

           


            /**
             * your process end
             */
        } finally {
            ParallelBatch::endChildProcess($this);
        }
    }