2021-09-02 11:53:20 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Core/Defines.h>
|
|
|
|
#include <Core/BaseSettings.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTStorage;
|
|
|
|
|
2021-09-09 22:04:52 +00:00
|
|
|
#define LIST_OF_EXECUTABLE_SETTINGS(M) \
|
2021-12-24 10:39:48 +00:00
|
|
|
M(Bool, send_chunk_header, false, "Send number_of_rows\n before sending chunk to process.", 0) \
|
|
|
|
M(UInt64, pool_size, 16, "Processes pool size. If size == 0, then there is no size restrictions.", 0) \
|
2021-09-02 11:53:20 +00:00
|
|
|
M(UInt64, max_command_execution_time, 10, "Max command execution time in seconds.", 0) \
|
|
|
|
M(UInt64, command_termination_timeout, 10, "Command termination timeout in seconds.", 0) \
|
2021-12-24 10:39:48 +00:00
|
|
|
M(UInt64, command_read_timeout, 10000, "Timeout for reading data from command stdout in milliseconds.", 0) \
|
|
|
|
M(UInt64, command_write_timeout, 10000, "Timeout for writing data to command stdin in milliseconds.", 0)
|
2021-09-02 11:53:20 +00:00
|
|
|
|
2023-01-26 14:06:46 +00:00
|
|
|
DECLARE_SETTINGS_TRAITS(ExecutableSettingsTraits, LIST_OF_EXECUTABLE_SETTINGS, NO_ALIASES)
|
2021-09-02 11:53:20 +00:00
|
|
|
|
|
|
|
/// Settings for ExecutablePool engine.
|
2021-09-09 22:04:52 +00:00
|
|
|
struct ExecutableSettings : public BaseSettings<ExecutableSettingsTraits>
|
2021-09-02 11:53:20 +00:00
|
|
|
{
|
2021-11-01 11:22:21 +00:00
|
|
|
std::string script_name;
|
|
|
|
std::vector<std::string> script_arguments;
|
|
|
|
|
|
|
|
bool is_executable_pool = false;
|
|
|
|
|
2021-09-02 11:53:20 +00:00
|
|
|
void loadFromQuery(ASTStorage & storage_def);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|