Skip to content

Commit

Permalink
Merge pull request #60 from petabridge/dev
Browse files Browse the repository at this point in the history
v0.1.6 Release
  • Loading branch information
Aaronontheweb authored Aug 16, 2019
2 parents d94b69f + eb2df36 commit 13dc4fd
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 11 deletions.
4 changes: 2 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#### 0.1.5 August 14 2019 ####
* Upgraded to Akka.NET v1.3.14 and Phobos v0.7.0
#### 0.1.6 August 16 2019 ####
* Added cluster singleton for pricing entity startup.
11 changes: 11 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ if [ ! -f "$FAKE_EXE" ]; then
exit 1
fi

###########################################################################
# INSTALL Protobuf
###########################################################################
if [ ! -f "$PROTOBUF_EXE" ]; then
mono "$NUGET_EXE" install Google.Protobuf.Tools -ExcludeVersion -Version $PROTOBUF_VERSION -OutputDirectory "$TOOLS_DIR"
if [ $? -ne 0 ]; then
echo "An error occured while installing Google.Protobuf.Tools."
exit 1
fi
fi

###########################################################################
# INSTALL DOCFX
###########################################################################
Expand Down
2 changes: 1 addition & 1 deletion k8s/pricing-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
terminationGracePeriodSeconds: 35
containers:
- name: pricing
image: akka.cqrs.pricing:0.1.5
image: akka.cqrs.pricing:0.1.6
lifecycle:
preStop:
exec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/pricing-web-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
terminationGracePeriodSeconds: 35
containers:
- name: pricing-web
image: akka.cqrs.pricing.web:0.1.5
image: akka.cqrs.pricing.web:0.1.6
lifecycle:
preStop:
exec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/tradeprocessor-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
terminationGracePeriodSeconds: 35
containers:
- name: trade-processor
image: akka.cqrs.tradeprocessor:0.1.5
image: akka.cqrs.tradeprocessor:0.1.6
lifecycle:
preStop:
exec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/traders-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
terminationGracePeriodSeconds: 35
containers:
- name: traders
image: akka.cqrs.traders:0.1.5
image: akka.cqrs.traders:0.1.6
lifecycle:
preStop:
exec:
Expand Down
7 changes: 4 additions & 3 deletions src/Akka.CQRS.Pricing.Actors/MatchAggregator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ private void Recovers()
/// Recovery has completed successfully.
/// </summary>
protected override void OnReplaySuccess()
{
_publishPricesTask = Context.System.Scheduler.ScheduleTellRepeatedlyCancelable(TimeSpan.FromSeconds(10),
TimeSpan.FromSeconds(10), Self, PublishEvents.Instance, ActorRefs.NoSender);
{

// setup subscription to TradeEventPublisher
Self.Tell(DoSubscribe.Instance);
Expand Down Expand Up @@ -263,6 +261,9 @@ private void Commands()

protected override void PreStart()
{
_publishPricesTask = Context.System.Scheduler.ScheduleTellRepeatedlyCancelable(TimeSpan.FromSeconds(10),
TimeSpan.FromSeconds(10), Self, PublishEvents.Instance, ActorRefs.NoSender);

_log.Info("Starting...");
base.PreStart();
}
Expand Down
4 changes: 4 additions & 0 deletions src/Akka.CQRS.Pricing.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ static int Main(string[] args)

var sharding = ClusterSharding.Get(actorSystem);


var shardRegion = sharding.Start("priceAggregator",
s => Props.Create(() => new MatchAggregator(s)),
ClusterShardingSettings.Create(actorSystem),
new StockShardMsgRouter());

var priceInitiatorActor = actorSystem.ActorOf(ClusterSingletonManager.Props(Props.Create(() => new PriceInitiatorActor(shardRegion)),
ClusterSingletonManagerSettings.Create(actorSystem).WithRole("pricing-engine").WithSingletonName("priceInitiator")), "priceInitiator");

var clientHandler =
actorSystem.ActorOf(Props.Create(() => new ClientHandlerActor(shardRegion)), "subscriptions");

Expand Down
4 changes: 2 additions & 2 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<Copyright>Copyright © 2015-2019 Petabridge</Copyright>
<Authors>Petabridge</Authors>
<VersionPrefix>0.1.5</VersionPrefix>
<PackageReleaseNotes>Upgraded to Akka.NET v1.3.14 and Phobos v0.7.0</PackageReleaseNotes>
<VersionPrefix>0.1.6</VersionPrefix>
<PackageReleaseNotes>Added cluster singleton for pricing entity startup.</PackageReleaseNotes>
<PackageIconUrl>
</PackageIconUrl>
<PackageProjectUrl>
Expand Down

0 comments on commit 13dc4fd

Please sign in to comment.