Skip to content

Commit

Permalink
feat: allow deploy callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
VonDerBeck committed Jul 31, 2024
1 parent 0edf799 commit cfa1d70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ app.CreateZeebeDeployment()
app.Run();
```

The alternative `DeployAndContinueWith(...)` method offers the ability to register callbacks that are executed after successful deployment.

### Zeebe Workers

A Zeebe Worker is an implementation of `IZeebeWorker`, `IAsyncZeebeWorker`, `IZeebeWorkerWithResult` or `IAsyncZeebeWorkerWithResult`. Zeebe Workers are automatically added to the DI container, therefore you can use dependency injection inside. The default worker configuration can be overwritten with `AbstractWorkerAttribute` implementations, see [attributes] for more information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ So this is our version of a good Bootstrap Extension for the C# Zeebe Client. Cr
<PackageIcon>zeebe-logo.png</PackageIcon>
<Company>Accso - Accelerated Solutions GmbH</Company>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>2.1.6</Version>
<Version>2.1.10</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'">
Expand Down
4 changes: 2 additions & 2 deletions src/Zeebe.Client.Accelerator/ZeebeResourceDeployer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public ZeebeResourceDeployerWithDirectory AddResource(string resource)
public async void Deploy()
=> await DeployAsync();

public async void Deploy(Action callback)
public async void DeployAndContinueWith(Action callback)
=> await DeployAsync().ContinueWith(t => callback());

public async void Deploy(Func<Task> asyncCallback)
public async void DeployAndContinueWith(Func<Task> asyncCallback)
=> await DeployAsync().ContinueWith(async t => await asyncCallback());

public async Task DeployAsync()
Expand Down

0 comments on commit cfa1d70

Please sign in to comment.