Skip to content

Commit

Permalink
Making ISubscriber Execute Async
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarbutt committed Jun 25, 2020
1 parent 5b6b398 commit 0246a61
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion HangFire.TopicExtensions/HangFire.TopicExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<PackageLicenseExpression></PackageLicenseExpression>
<Copyright>2020</Copyright>
<PackageProjectUrl>https://github.com/jmarbutt/HangFire.TopicExtensions</PackageProjectUrl>
Expand Down
6 changes: 4 additions & 2 deletions HangFire.TopicExtensions/Interfaces/ISubscriber.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace HangFire.TopicExtensions.Interfaces
using System.Threading.Tasks;

namespace HangFire.TopicExtensions.Interfaces
{
public interface ISubscriber
{
void Execute(object context);
Task Execute(object context);
}
}
5 changes: 3 additions & 2 deletions HangFirePubSub.Sample/SampleSubscriber.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Hangfire.Server;
using System.Threading.Tasks;
using Hangfire.Server;
using HangFire.TopicExtensions.Attributes;
using HangFire.TopicExtensions.Interfaces;
using Microsoft.Extensions.Configuration;
Expand All @@ -14,7 +15,7 @@ public SampleSubscriber(IConfiguration config)
{
_config = config;
}
public void Execute(object context)
public async Task Execute(object context)
{

}
Expand Down
5 changes: 3 additions & 2 deletions HangFirePubSub.Sample/SampleSubscriber2.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using HangFire.TopicExtensions.Attributes;
using System.Threading.Tasks;
using HangFire.TopicExtensions.Attributes;
using HangFire.TopicExtensions.Interfaces;

namespace HangFirePubSub.Sample
{
[SubscriberJob("topic1")]
public class SampleSubscriber2 : ISubscriber
{
public void Execute(object context)
public async Task Execute(object context)
{

}
Expand Down
5 changes: 3 additions & 2 deletions HangFirePubSub.Sample/SampleSubscriber3.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using HangFire.TopicExtensions.Attributes;
using System.Threading.Tasks;
using HangFire.TopicExtensions.Attributes;
using HangFire.TopicExtensions.Interfaces;

namespace HangFirePubSub.Sample
{
[SubscriberJob("topic2")]
public class SampleSubscriber3 : ISubscriber
{
public void Execute(object context)
public async Task Execute(object context)
{

}
Expand Down

0 comments on commit 0246a61

Please sign in to comment.