Skip to content

Commit

Permalink
fix ActivitySchedulerOptions (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt authored Apr 14, 2022
1 parent b050e46 commit 5d18cb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@ public enum ActivitySchedulerOptions

public static class ActivityScheduling
{
public static bool RequiresLoadMonitor(ActivitySchedulerOptions options)
{
switch (options)
{
case ActivitySchedulerOptions.Local:
case ActivitySchedulerOptions.Static:
return false;
case ActivitySchedulerOptions.Locavore:
return true;
default:
throw new NotImplementedException("missing switch case");
}
}

public static bool RequiresPeriodicOffloadDecision(ActivitySchedulerOptions options)
{
switch (options)
Expand All @@ -56,8 +42,6 @@ public static bool RequiresPeriodicOffloadDecision(ActivitySchedulerOptions opti
default:
throw new NotImplementedException("missing switch case");
}
}


}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ protected override async Task Process(IList<PartitionEvent> batch)
await this.PublishLoadAndPositions();
}

if (this.partition.NumberPartitions() > 1)
if (this.partition.NumberPartitions() > 1 && this.partition.Settings.ActivityScheduler == ActivitySchedulerOptions.Locavore)
{
var activitiesState = (await this.store.ReadAsync(TrackedObjectKey.Activities, this.effectTracker)) as ActivitiesState;
activitiesState.CollectLoadMonitorInformation();
Expand Down

0 comments on commit 5d18cb1

Please sign in to comment.