nmc/laravel-cloud-tasks

This is my package LaravelCloudTask

v1.0.1 2024-02-06 11:10 UTC

This package is auto-updated.

Last update: 2024-04-06 11:47:48 UTC


README

Latest Version on Packagist Total Downloads

Installation

You can install the package via composer:

composer require nmc/laravel-cloud-tasks

You can publish the config file with:

php artisan vendor:publish --provider="Nmc\CloudTasks\CloudTasksServiceProvider" --tag="cloud-tasks-config"

This is the contents of the published config file:

use Nmc\CloudTasks\Http\Middleware\VerifyCloudTasksToken;

return [
    'middleware' => ['api', VerifyCloudTasksToken::class],
    'queue' => [
        'driver' => 'cloud-tasks',
        'project' => env('CLOUD_TASKS_PROJECT_ID'),
        'location' => env('CLOUD_TASKS_LOCATION'),
        'queue' => env('CLOUD_TASKS_QUEUE', 'default'),
        'handler_url' => env('CLOUD_TASKS_HANDLER_URL', env('APP_URL') . '/cloud-tasks-handler'),
        'credentials' => env('CLOUD_TASKS_CREDENTIALS', config_path('credentials.json')),
        'auth' => [
            'service_account_email' => env('CLOUD_TASKS_SERVICE_ACCOUNT_EMAIL'),
            'audience' => env('CLOUD_TASKS_AUDIENCE'),
        ],
        'after_commit' => false,
    ]
];

Credits

License

The MIT License (MIT). Please see License File for more information.