[Feature Request]: Set Executor Instances dynamically
Closed this issue · 3 comments
Feature Description
Hi,
As discussed in #2002, currently the number of each process executor instances is set statically in ProcessExecutor.java Line 46 To 67.
It would be great if these values are set in properties file or as Docker ENV Vars.
Why is this feature valuable?
It gives the possibility to launch many instances in case where a heavy work load is expected (our needs), actually Stirling treats requests in queue fashion, it's not possible to convert files simultaneously.
Suggested Implementation
Using a default values if not set in the properties file.
in ProcessExecutor.java Line 46 To 67.
public static ProcessExecutor getInstance(Processes processType, boolean liveUpdates) {
return instances.computeIfAbsent(
processType,
key -> {
int semaphoreLimit =
switch (key) {
case LIBRE_OFFICE -> (Integer) properties.getOrDefault("libreOfficeInstanceLimit", 1);
//other cases
....
}
...
//rest of impl
}
Additional Information
No response
No Duplicate of the Feature
- I have verified that there are no existing features requests similar to my request.
Hello, I would like to work on this request, could you please assign it to me? Thanks!
HI, I have a question about this: regarding the "timeoutMinutes" values for each process type, should they be dynamically set from the properties as well?
In ProcessExecutor.java, line 58 to 68.
long timeoutMinutes =
switch (key) {
case LIBRE_OFFICE -> 30;
case PDFTOHTML -> 20;
case OCR_MY_PDF -> 30;
case PYTHON_OPENCV -> 30;
case GHOSTSCRIPT -> 30;
case WEASYPRINT -> 30;
case INSTALL_APP -> 60;
case CALIBRE -> 30;
};
Thank you in advance.
Seems a good idea as well!