Giter VIP home page Giter VIP logo

Comments (5)

mnapoli avatar mnapoli commented on June 8, 2024

Hi, could you post the content of worker.php?

from laravel-bridge.

eneskaya avatar eneskaya commented on June 8, 2024

Hi, could you post the content of worker.php?

Yes, of course. Here you go:

<?php declare(strict_types=1);

use Bref\LaravelBridge\Queue\LaravelSqsHandler;
use Illuminate\Foundation\Application;

require __DIR__ . '/vendor/autoload.php';
/** @var Application $app */
$app = require __DIR__ . '/bootstrap/app.php';

/**
 * For Lumen, use:
 * $app->make(Laravel\Lumen\Console\Kernel::class);
 * $app->boot();
 */
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

Log::info('WORKER STARTED!');

return $app->makeWith(LaravelSqsHandler::class, [
    'connection' => 'sqs', // this is the Laravel Queue connection
    'queue' => getenv('SQS_QUEUE'),
]);

Edit: Versions I am using

  • bref/bref: 1.4.1
  • bref/laravel-bridge: 1.1.3
  • laravel/framework: 8.77.0

from laravel-bridge.

mnapoli avatar mnapoli commented on June 8, 2024

OH I found it. It confused me so much 😅

In your CDK config you are adding the console layer, but it doesn't make sense here. The console layer is specifically for running CLI scripts or binaries.

Here you are using PHP code (files & classes) to handle the event, so you can remove it and give it another try.

I guess that nothing was displayed in the output because with the console layer your worker.php file was executed "as-is", and the only thing it does is boot Laravel and return a service, and then it would exit (with the console layer).

from laravel-bridge.

eneskaya avatar eneskaya commented on June 8, 2024

Oh man, that was really the problem! It only cost me like 1 week of debugging 😄 Thank you so much for your quick help!

from laravel-bridge.

mnapoli avatar mnapoli commented on June 8, 2024

Oh yeah I hate when that happens ^^

No problem!

from laravel-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.