File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 8
8
use Illuminate \Contracts \Http \Kernel ;
9
9
use Psr \Container \ContainerInterface ;
10
10
use Psr \Http \Server \RequestHandlerInterface ;
11
+ use Runtime \Bref \Lambda \LambdaClient ;
11
12
use Symfony \Component \Console \Application ;
12
13
use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
13
14
use Symfony \Component \HttpKernel \HttpKernelInterface ;
@@ -32,6 +33,20 @@ public function __construct(array $options = [])
32
33
}
33
34
34
35
public function getRunner (?object $ application ): RunnerInterface
36
+ {
37
+ try {
38
+ return $ this ->tryToFindRunner ($ application );
39
+ } catch (\Throwable $ e ) {
40
+ if ('aws ' === $ this ->options ['bref_runner_type ' ]) {
41
+ $ lambda = LambdaClient::fromEnvironmentVariable ('symfony-runtime ' );
42
+ $ lambda ->failInitialization ('Could not get the Runtime runner. ' , $ e );
43
+ }
44
+
45
+ throw $ e ;
46
+ }
47
+ }
48
+
49
+ private function tryToFindRunner (?object $ application )
35
50
{
36
51
if ($ application instanceof ContainerInterface) {
37
52
$ handler = explode (': ' , $ _SERVER ['_HANDLER ' ]);
You can’t perform that action at this time.
0 commit comments