Skip to content

Commit

Permalink
Fix the binding for ServerModule to the root SystemProps Configuration (
Browse files Browse the repository at this point in the history
Netflix#1895)

* Fixing the root configuration issue

* Add Override annotation and make singleton

* Making repairservice default in properties files

Co-authored-by: James DeMichele <james.demichele@redfin.com>
  • Loading branch information
james-deee and james-deee authored Oct 8, 2020
1 parent 4e05d59 commit 75db6af
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions docker/server/config/config-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ workflow.namespace.queue.prefix=conductor_queues
# No. of threads allocated to dyno-queues (optional)
queues.dynomite.threads=10

# By default with dynomite, we want the repairservice enabled
workflow.repairservice.enabled=true


# Non-quorum port used to connect to local redis. Used by dyno-queues.
# When using redis directly, set this to the same port as redis server
# For Dynomite, this is 22122 by default or the local redis-server port used by Dynomite.
Expand Down
3 changes: 3 additions & 0 deletions docker/server/config/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ workflow.namespace.queue.prefix=conductor_queues
# No. of threads allocated to dyno-queues (optional)
queues.dynomite.threads=10

# By default with dynomite, we want the repairservice enabled
workflow.repairservice.enabled=true

# Non-quorum port used to connect to local redis. Used by dyno-queues.
# When using redis directly, set this to the same port as redis server
# For Dynomite, this is 22122 by default or the local redis-server port used by Dynomite.
Expand Down
4 changes: 4 additions & 0 deletions docker/serverAndUI/config/config-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ workflow.namespace.queue.prefix=conductor_queues
# No. of threads allocated to dyno-queues (optional)
queues.dynomite.threads=10

# By default with dynomite, we want the repairservice enabled
workflow.repairservice.enabled=true


# Non-quorum port used to connect to local redis. Used by dyno-queues.
# When using redis directly, set this to the same port as redis server
# For Dynomite, this is 22122 by default or the local redis-server port used by Dynomite.
Expand Down
4 changes: 4 additions & 0 deletions docker/serverAndUI/config/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ workflow.namespace.queue.prefix=conductor_queues
# No. of threads allocated to dyno-queues (optional)
queues.dynomite.threads=10

# By default with dynomite, we want the repairservice enabled
workflow.repairservice.enabled=true


# Non-quorum port used to connect to local redis. Used by dyno-queues.
# When using redis directly, set this to the same port as redis server
# For Dynomite, this is 22122 by default or the local redis-server port used by Dynomite.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,4 @@ default String getQueuePrefix() {

return prefix;
}

/**
* WorkflowRepairService is enabled by default for DynoQueues, since this queue receipe supports getMessage feature.
* @return
*/
default boolean isWorkflowRepairServiceEnabled() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ public class BootstrapModule extends AbstractModule {
@Override
protected void configure() {
bind(Configuration.class).to(SystemPropertiesConfiguration.class);
bind(ModulesProvider.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.netflix.conductor.core.config.Configuration;
import com.netflix.conductor.core.config.CoreModule;
import com.netflix.conductor.core.config.EventModule;
import com.netflix.conductor.core.config.SystemPropertiesConfiguration;
import com.netflix.conductor.core.config.ValidationModule;
import com.netflix.conductor.core.execution.WorkflowSweeper;
import com.netflix.conductor.dyno.SystemPropertiesDynomiteConfiguration;
Expand Down Expand Up @@ -48,7 +49,7 @@ protected void configure() {
install(new EventModule());

bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
bind(Configuration.class).to(SystemPropertiesDynomiteConfiguration.class);
bind(Configuration.class).to(SystemPropertiesConfiguration.class).in(Scopes.SINGLETON);
bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class).in(Scopes.SINGLETON);
bind(WorkflowSweeper.class).asEagerSingleton();
bind(WorkflowMonitor.class).asEagerSingleton();
Expand Down
4 changes: 4 additions & 0 deletions server/src/main/resources/server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ workflow.namespace.queue.prefix=
#no. of threads allocated to dyno-queues
queues.dynomite.threads=10

# By default with dynomite, we want the repairservice enabled
workflow.repairservice.enabled=true


#non-quorum port used to connect to local redis. Used by dyno-queues
queues.dynomite.nonQuorum.port=22122

Expand Down

0 comments on commit 75db6af

Please sign in to comment.