compress parsed data to .json.zst
This commit is contained in:
@@ -7,12 +7,14 @@ public class BackgroundJobManager
|
||||
{
|
||||
private readonly ILogger _parentLogger;
|
||||
private readonly Config.SaveUploadConfig _uploadConfig;
|
||||
private readonly int _zstdCompressionLevel;
|
||||
private long _lastJobId;
|
||||
|
||||
public BackgroundJobManager(ILogger logger, Config.SaveUploadConfig uploadConfig)
|
||||
public BackgroundJobManager(ILogger logger, Config.SaveUploadConfig uploadConfig, int zstdCompressionLevel)
|
||||
{
|
||||
_parentLogger = logger;
|
||||
_uploadConfig = uploadConfig;
|
||||
_zstdCompressionLevel = zstdCompressionLevel;
|
||||
}
|
||||
|
||||
public SaveParsingOperation StartNewParsingOperation(
|
||||
@@ -21,7 +23,7 @@ public class BackgroundJobManager
|
||||
long nextId = Interlocked.Increment(ref _lastJobId);
|
||||
var contextLogger = new ContextLogger($"BackgroundJob-{nextId}", _parentLogger);
|
||||
var op = new SaveParsingOperation(nextId, meta, filter,
|
||||
_uploadConfig.MaxSizePlainTextBytes, contextLogger, ct);
|
||||
_uploadConfig.MaxSizePlainTextBytes, _zstdCompressionLevel, contextLogger, ct);
|
||||
op.StartAsync();
|
||||
return op;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user