mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(archival): ♻ 'hope' that multiple jobs don't conflict between git stage and commit
This commit is contained in:
parent
09f35b2922
commit
b1ba4dfb3d
2 changed files with 2 additions and 3 deletions
|
|
@ -68,9 +68,9 @@ public async Task ArchiveFileAsync(
|
|||
public void Commit()
|
||||
{
|
||||
var fileNames = _writtenFiles.Select(f => f.Name).ToList();
|
||||
Commands.Stage(_repo, fileNames);
|
||||
var signature = new Signature(_options.UserName, _options.UserEmail, DateTime.UtcNow);
|
||||
var message = $"feat(archives): archive {fileNames.Count} files{Environment.NewLine}{string.Join(Environment.NewLine, fileNames)}";
|
||||
Commands.Stage(_repo, fileNames);
|
||||
_repo.Commit(message, signature, signature);
|
||||
|
||||
_logger.LogDebug("Committed {@FileNames}", fileNames);
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ public static void AddSchedulingServices(this IServiceCollection services, IConf
|
|||
|
||||
public static void UseScheduling(this IApplicationBuilder app)
|
||||
{
|
||||
// TODO: re-evaluate git in parallel
|
||||
app.UseHangfireServer(new BackgroundJobServerOptions {WorkerCount = 1});
|
||||
app.UseHangfireServer(new BackgroundJobServerOptions {WorkerCount = Environment.ProcessorCount});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue