feat: start scheduler in local development
This commit is contained in:
@@ -39,7 +39,7 @@ function Resolve-LocalDevCommands {
|
||||
[Parameter(Mandatory)][string]$FrontendPath
|
||||
)
|
||||
|
||||
foreach ($entrypoint in 'api', 'worker') {
|
||||
foreach ($entrypoint in 'api', 'worker', 'scheduler') {
|
||||
$path = Join-Path $BackendPath "cmd\$entrypoint"
|
||||
if (-not (Test-Path -LiteralPath $path -PathType Container)) {
|
||||
throw "Backend entrypoint cmd/$entrypoint is missing under $BackendPath"
|
||||
@@ -58,6 +58,7 @@ function Resolve-LocalDevCommands {
|
||||
return @{
|
||||
Api = @{ FilePath = 'go'; Arguments = @('run', './cmd/api'); WorkingDirectory = $BackendPath }
|
||||
Worker = @{ FilePath = 'go'; Arguments = @('run', './cmd/worker'); WorkingDirectory = $BackendPath }
|
||||
Scheduler = @{ FilePath = 'go'; Arguments = @('run', './cmd/scheduler'); WorkingDirectory = $BackendPath }
|
||||
Frontend = @{ FilePath = 'npm.cmd'; Arguments = @('run', 'dev', '--', '--host', '127.0.0.1'); WorkingDirectory = $FrontendPath }
|
||||
}
|
||||
}
|
||||
@@ -188,6 +189,7 @@ function Start-LocalDev {
|
||||
try {
|
||||
$started += Start-LocalProcess -Name 'api' -Command $commands.Api -Environment $backendEnvironment -LogDirectory $logDirectory
|
||||
$started += Start-LocalProcess -Name 'worker' -Command $commands.Worker -Environment $backendEnvironment -LogDirectory $logDirectory
|
||||
$started += Start-LocalProcess -Name 'scheduler' -Command $commands.Scheduler -Environment $backendEnvironment -LogDirectory $logDirectory
|
||||
$started += Start-LocalProcess -Name 'frontend' -Command $commands.Frontend -Environment @{} -LogDirectory $logDirectory
|
||||
$started | ConvertTo-Json | Set-Content -LiteralPath (Get-StatePath -DeploymentPath $DeploymentPath) -Encoding utf8
|
||||
return $started
|
||||
|
||||
Reference in New Issue
Block a user