Skip to content

Commit

Permalink
Remove LoadSchedulesOnStartup option
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 19, 2023
1 parent 9689187 commit 545edc7
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
3 changes: 2 additions & 1 deletion server/Tingle.Dependabot/AppSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public static async Task SetupAsync(WebApplication app, CancellationToken cancel
await synchronizer.SynchronizeAsync(false, cancellationToken); /* database sync should not trigger, just in case it's too many */
}

if (options.LoadSchedulesOnStartup)
// skip loading schedules if told to
if (!app.Configuration.GetValue<bool>("SKIP_LOAD_SCHEDULES"))
{
var dbContext = provider.GetRequiredService<MainDbContext>();
var repositories = await dbContext.Repositories.ToListAsync(cancellationToken);
Expand Down
3 changes: 2 additions & 1 deletion server/Tingle.Dependabot/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"applicationUrl": "https://localhost:44390;http://localhost:59269",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"EFCORE_PERFORM_MIGRATIONS": "true"
"EFCORE_PERFORM_MIGRATIONS": "true",
"SKIP_LOAD_SCHEDULES": "true"
}
},
"Docker": {
Expand Down
3 changes: 0 additions & 3 deletions server/Tingle.Dependabot/Workflow/WorkflowOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ public class WorkflowOptions
/// <summary>Whether to synchronize repositories on startup.</summary>
public bool SynchronizeOnStartup { get; set; } = true;

/// <summary>Whether to load schedules on startup.</summary>
public bool LoadSchedulesOnStartup { get; set; } = true;

/// <summary>Whether to create/update notifications on startup.</summary>
public bool CreateOrUpdateWebhooksOnStartup { get; set; } = true;

Expand Down
1 change: 0 additions & 1 deletion server/Tingle.Dependabot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

"Workflow": {
"SynchronizeOnStartup": false,
"LoadSchedulesOnStartup": false,
"CreateOrUpdateWebhooksOnStartup": false,
"WebhookEndpoint": "http://localhost:3000/",
"SubscriptionPassword": "<my-password-here>",
Expand Down
1 change: 0 additions & 1 deletion server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ resource app 'Microsoft.App/containerApps@2023-05-01' = {
{ name: 'ConnectionStrings__Sql', secretRef: 'connection-strings-sql' }

{ name: 'Workflow__SynchronizeOnStartup', value: synchronizeOnStartup ? 'true' : 'false' }
{ name: 'Workflow__LoadSchedulesOnStartup', value: 'true' }
{ name: 'Workflow__CreateOrUpdateWebhooksOnStartup', value: createOrUpdateWebhooksOnStartup ? 'true' : 'false' }
{ name: 'Workflow__ProjectUrl', value: projectUrl }
{ name: 'Workflow__ProjectToken', secretRef: 'project-token' }
Expand Down
4 changes: 0 additions & 4 deletions server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,6 @@
"name": "Workflow__SynchronizeOnStartup",
"value": "[if(parameters('synchronizeOnStartup'), 'true', 'false')]"
},
{
"name": "Workflow__LoadSchedulesOnStartup",
"value": "true"
},
{
"name": "Workflow__CreateOrUpdateWebhooksOnStartup",
"value": "[if(parameters('createOrUpdateWebhooksOnStartup'), 'true', 'false')]"
Expand Down

0 comments on commit 545edc7

Please sign in to comment.