-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathActivate.php
More file actions
42 lines (34 loc) · 973 Bytes
/
Activate.php
File metadata and controls
42 lines (34 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
/**
* @author Aaron Francis <aaron@hammerstone.dev>
*/
namespace Hammerstone\Sidecar\Commands;
use Hammerstone\Sidecar\Deployment;
use Hammerstone\Sidecar\Exceptions\NoFunctionsRegisteredException;
use Hammerstone\Sidecar\Sidecar;
class Activate extends EnvironmentAwareCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'sidecar:activate
{--pre-warm : Send warming requests to Sidecar functions}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Activate Sidecar functions that have already been deployed';
/**
* @throws NoFunctionsRegisteredException
*/
public function handle()
{
$this->overrideEnvironment();
Sidecar::addCommandLogger($this);
Deployment::make()->activate($this->option('pre-warm'));
}
}