Skip to content

Commit

Permalink
Use same serializers (object) for both serialization and deserializat…
Browse files Browse the repository at this point in the history
…ion (#312)

* Always use object serializer when serializing the message.

Fix for issue #311.

* Fix Azure Pipelines CI/CD script

---------

Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
  • Loading branch information
object and Arkatufus committed Sep 5, 2023
1 parent 7c3df14 commit ccc2958
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
clean: false # whether to fetch clean each time
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true
- task: UseDotNet@2
displayName: "Use .NET SDK 3.1"
inputs:
version: 3.1.x
# Linux or macOS
- task: Bash@3
displayName: Linux / OSX Build
Expand Down
2 changes: 1 addition & 1 deletion build-system/linux-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- template: azure-pipeline.template.yaml
parameters:
name: Ubuntu
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-latest'
scriptFileName: ./build.sh
scriptArgs: all
2 changes: 1 addition & 1 deletion build-system/windows-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- template: azure-pipeline.template.yaml
parameters:
name: Windows
vmImage: 'windows-2019'
vmImage: 'windows-latest'
scriptFileName: build.cmd
scriptArgs: all
4 changes: 2 additions & 2 deletions src/Akka.Quartz.Actor/QuartzPersistentJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public Task Execute(IJobExecutionContext context)

public static JobBuilder CreateBuilderWithData(ActorPath actorPath, object message, ActorSystem system)
{
Serializer messageSerializer = system.Serialization.FindSerializerFor(message);
Serializer messageSerializer = system.Serialization.FindSerializerForType(typeof(object));
var serializedMessage = messageSerializer.ToBinary(message);
var serializedPath = actorPath.ToSerializationFormat();
var jdm = new JobDataMap();
jdm.AddAndReturn(MessageKey, serializedMessage).Add(ActorKey, serializedPath);
return JobBuilder.Create<QuartzPersistentJob>().UsingJobData(jdm);
}
}
}
}

0 comments on commit ccc2958

Please sign in to comment.