Skip to content

Commit

Permalink
fix: add the default task setup back to the initial setup (#1534)
Browse files Browse the repository at this point in the history
### Motivation
After the removal of CloudPerms the initial setup did not contain the
default task setup for `Lobby` and `Proxy` anymore because it only
relied on the fact that the task provider was initialized before the
setup was started. The removal of CloudPerms also removed that early
init and thus the setup was not complete anymore.

### Modification
Added the task provider as parameter to the setup step of the node.
Aerogel is forced to init the provider first and therefore the setup is
registered before the actual start of the setup.

### Result
The default task setup is back.
  • Loading branch information
0utplay authored Oct 21, 2024
1 parent 72d36c5 commit 4370add
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion node/src/main/java/eu/cloudnetservice/node/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import eu.cloudnetservice.driver.network.netty.NettyUtil;
import eu.cloudnetservice.driver.network.rpc.factory.RPCFactory;
import eu.cloudnetservice.driver.network.rpc.handler.RPCHandlerRegistry;
import eu.cloudnetservice.driver.provider.ServiceTaskProvider;
import eu.cloudnetservice.driver.registry.ServiceRegistry;
import eu.cloudnetservice.driver.registry.injection.Service;
import eu.cloudnetservice.driver.template.TemplateStorage;
Expand Down Expand Up @@ -241,7 +242,9 @@ private void initializeDatabaseProvider(
@Inject
@Order(450)
private void executeSetupIfRequired(
@NonNull DefaultInstallation installation
@NonNull DefaultInstallation installation,
// we have to inject the task provider here so that it registers the default task setup when initialized
@NonNull ServiceTaskProvider taskProvider
) {
// execute the setup if needed
installation.executeFirstStartSetup();
Expand Down

0 comments on commit 4370add

Please sign in to comment.