-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
1,182 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "NuGet" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,27 +98,12 @@ jobs: | |
- name: Publish to feedz.io | ||
run: dotnet nuget push *.nupkg -k ${{ secrets.FEEDZ_API_KEY }} -s ${{ env.feedz_feed_source }} --skip-duplicate | ||
|
||
publish_preview_nuget: | ||
name: Publish preview to nuget.org | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: ${{ github.event_name == 'prereleased' && github.event.action == 'published' }} | ||
steps: | ||
- name: Download Packages | ||
uses: actions/[email protected] | ||
with: | ||
name: elsa-nuget-packages | ||
|
||
- name: Publish to nuget.org | ||
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.nuget_feed_source }} --skip-duplicate | ||
|
||
publish_nuget: | ||
name: Publish release to nuget.org | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: ${{ github.event_name == 'release' && github.event.action == 'published' }} | ||
if: ${{ github.event.action == 'published' }} | ||
steps: | ||
- name: Download Packages | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,12 @@ | |
using Elsa.Workflows.Runtime.Options; | ||
using Elsa.Workflows.Runtime.Stores; | ||
using Elsa.Workflows.Runtime.Tasks; | ||
using Hangfire; | ||
using Hangfire.MemoryStorage; | ||
using Hangfire.PostgreSql; | ||
using Hangfire.PostgreSql.Factories; | ||
using Hangfire.SqlServer; | ||
using Hangfire.Storage.SQLite; | ||
using JetBrains.Annotations; | ||
using Medallion.Threading.FileSystem; | ||
using Medallion.Threading.Postgres; | ||
|
@@ -79,7 +85,7 @@ | |
const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.MassTransit; | ||
const MassTransitBroker massTransitBroker = MassTransitBroker.Memory; | ||
const bool useMultitenancy = false; | ||
const bool useTenantsFromConfiguration = false; | ||
const bool useTenantsFromConfiguration = true; | ||
const bool useAgents = false; | ||
const bool useSecrets = false; | ||
const bool disableVariableWrappers = false; | ||
|
@@ -133,7 +139,36 @@ | |
}); | ||
|
||
if (useHangfire) | ||
elsa.UseHangfire(); | ||
{ | ||
JobStorage jobStorage; | ||
if (sqlDatabaseProvider == SqlDatabaseProvider.PostgreSql) | ||
{ | ||
jobStorage = new PostgreSqlStorage(new NpgsqlConnectionFactory(postgresConnectionString, new() | ||
{ | ||
QueuePollInterval = TimeSpan.FromSeconds(1) | ||
})); | ||
} | ||
else if (sqlDatabaseProvider == SqlDatabaseProvider.Sqlite) | ||
{ | ||
jobStorage = new SQLiteStorage(sqliteConnectionString, new() | ||
{ | ||
QueuePollInterval = TimeSpan.FromSeconds(1) | ||
}); | ||
} | ||
else if (sqlDatabaseProvider == SqlDatabaseProvider.SqlServer) | ||
{ | ||
jobStorage = new SqlServerStorage(sqlServerConnectionString, new() | ||
{ | ||
QueuePollInterval = TimeSpan.FromSeconds(1) | ||
}); | ||
} | ||
else | ||
{ | ||
jobStorage = new MemoryStorage(); | ||
} | ||
|
||
elsa.UseHangfire(hangfire => hangfire.UseJobStorage(jobStorage)); | ||
} | ||
|
||
elsa | ||
.AddActivitiesFrom<Program>() | ||
|
@@ -334,6 +369,12 @@ | |
// Make sure to configure the path to the python DLL. E.g. /opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11 | ||
// alternatively, you can set the PYTHONNET_PYDLL environment variable. | ||
configuration.GetSection("Scripting:Python").Bind(options); | ||
|
||
options.AddScript(sb => | ||
{ | ||
sb.AppendLine("def greet():"); | ||
sb.AppendLine(" return \"Hello, welcome to Python!\""); | ||
}); | ||
}; | ||
}) | ||
.UseLiquid(liquid => liquid.FluidOptions = options => options.Encoder = HtmlEncoder.Default) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.