Skip to content

Commit

Permalink
Merge pull request #8 in MGC/mgc from feature/MGC-66-LsChronosSchedul…
Browse files Browse the repository at this point in the history
…erInitServiceImpl_always_used to master

* commit 'd4019e4d3cc926bc6eb331a26e0833b1fbc21cf7':
  MGC-66. LsChronosSchedulerInitServiceImpl used although the MgcApplication is not used Reduce Nodebindtimeout to 10 minutes
  • Loading branch information
juergen-fast committed Aug 21, 2018
2 parents 50c1f4a + d4019e4 commit 58201f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ChronosLocalSettingsConfigModel extends AbstractLocalSettingsConfig
private ValContext parseValContext;
@ALocalSettingsPath(comment = "Virtual Hostname used by chronos")
private String virtualHostName;
@ALocalSettingsPath(comment = "Node binding time in milliseconds", defaultValue = "3600000")
@ALocalSettingsPath(comment = "Node binding time in milliseconds", defaultValue = "60000")
private String minNodeBindTime;

public ChronosLocalSettingsConfigModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,23 @@
*/
public class LsChronosSchedulerInitServiceImpl implements ChronosSchedulerInitService
{
private static boolean mgcApplicationPresent()
{
try {
Class.forName("de.micromata.mgc.application.MgcApplication");
return true;
} catch (ClassNotFoundException e) {
// not catching.
return false;
}
}

@Override
public void initSchedulerManager(SchedulerManager schedManager)
{
if (mgcApplicationPresent() == false) {
return;
}
ChronosLocalSettingsConfigModel cm = new ChronosLocalSettingsConfigModel();
try {
cm.fromLocalSettings(LocalSettings.get());
Expand Down

0 comments on commit 58201f7

Please sign in to comment.