Skip to content

Commit e7eb26e

Browse files
authored
add max-keys config parameter for aws download job (eclipse-openvsx#1619)
1 parent 131a908 commit e7eb26e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

server/src/main/java/org/eclipse/openvsx/storage/log/AwsDownloadCountHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public class AwsDownloadCountHandler implements JobRequestHandler<HandlerJobRequ
6060
private final Logger logger = LoggerFactory.getLogger(AwsDownloadCountHandler.class);
6161

6262
private static final String LOG_LOCATION_PREFIX = "AWSLogs/";
63-
private static final int MAX_KEYS = 100;
6463

6564
private final AwsStorageService awsStorageService;
6665
private final DownloadCountProcessor processor;
@@ -77,6 +76,9 @@ public class AwsDownloadCountHandler implements JobRequestHandler<HandlerJobRequ
7776
@Value("${ovsx.logs.aws.cron:0 10 * * * *}")
7877
String cronSchedule;
7978

79+
@Value("${ovsx.logs.aws.max-keys:100}")
80+
int maxKeys;
81+
8082
LogFileParser logFileParser;
8183

8284
public AwsDownloadCountHandler(AwsStorageService awsStorageService, DownloadCountProcessor processor) {
@@ -272,7 +274,7 @@ private void deleteFile(String objectKey) {
272274
}
273275

274276
private ListObjectsV2Response listObjects(String continuationToken) {
275-
var builder = ListObjectsV2Request.builder().bucket(bucket).maxKeys(MAX_KEYS).prefix(logLocationPrefix);
277+
var builder = ListObjectsV2Request.builder().bucket(bucket).maxKeys(maxKeys).prefix(logLocationPrefix);
276278

277279
if (continuationToken != null) {
278280
builder.continuationToken(continuationToken);

0 commit comments

Comments
 (0)