Skip to content

Commit

Permalink
fixup! docker, core, editoast: add mode single-worker for all infra
Browse files Browse the repository at this point in the history
  • Loading branch information
bougue-pe committed Oct 3, 2024
1 parent e7b8258 commit 302e4ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package fr.sncf.osrd.cli

import com.beust.jcommander.Parameter
import com.beust.jcommander.Parameters
import com.rabbitmq.client.*
import com.rabbitmq.client.AMQP
import com.rabbitmq.client.Channel
import com.rabbitmq.client.ConnectionFactory
import com.rabbitmq.client.DeliverCallback
import fr.sncf.osrd.api.*
import fr.sncf.osrd.api.api_v2.conflicts.ConflictDetectionEndpointV2
import fr.sncf.osrd.api.api_v2.path_properties.PathPropEndpoint
Expand Down Expand Up @@ -48,8 +51,8 @@ class WorkerCommand : CliCommand {

init {
ALL_INFRA = !System.getenv("ALL_INFRA").isNullOrEmpty()
WORKER_ID = System.getenv("WORKER_ID") ?: (if (ALL_INFRA) "all_infra_worker" else null)
WORKER_KEY = System.getenv("WORKER_KEY") ?: (if (ALL_INFRA) "all" else null)
WORKER_ID = if (ALL_INFRA) "all_infra_worker" else System.getenv("WORKER_ID")
WORKER_KEY = if (ALL_INFRA) "all" else System.getenv("WORKER_KEY")
WORKER_AMQP_URI =
System.getenv("WORKER_AMQP_URI") ?: "amqp://osrd:[email protected]:5672/%2f"
WORKER_POOL = System.getenv("WORKER_POOL") ?: "core"
Expand Down

0 comments on commit 302e4ef

Please sign in to comment.