Added config option 'php-censor.build.writer_buffer_size' for configuring BuildErrorWriter buffer_size property (Count of inserts in the one SQL query).
This commit is contained in:
parent
a9309a1feb
commit
6fe5c78179
|
@ -42,7 +42,8 @@ php-censor:
|
|||
commit: false # This option allow/deny to post comments to Github commit
|
||||
pull_request: false # This option allow/deny to post comments to Github Pull Request
|
||||
build:
|
||||
remove_builds: true # This option allow/deny build cleaning
|
||||
remove_builds: true # This option allow/deny build cleaning
|
||||
writer_buffer_size: 500 # BuildErrorWriter buffer size (count of inserts in one SQL query)
|
||||
security:
|
||||
disable_auth: false # This option allows/deny you to disable authentication for PHP Censor
|
||||
default_user_id: 1 # Default user when authentication disabled
|
||||
|
|
|
@ -269,7 +269,8 @@ class InstallCommand extends Command
|
|||
],
|
||||
],
|
||||
'build' => [
|
||||
'remove_builds' => true,
|
||||
'remove_builds' => true,
|
||||
'writer_buffer_size' => 500,
|
||||
],
|
||||
'security' => [
|
||||
'disable_auth' => false,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace PHPCensor\Store;
|
||||
|
||||
use b8\Config;
|
||||
use b8\Database;
|
||||
|
||||
/**
|
||||
|
@ -19,7 +20,7 @@ class BuildErrorWriter
|
|||
* @var int
|
||||
* @see https://stackoverflow.com/questions/40361164/pdoexception-sqlstatehy000-general-error-7-number-of-parameters-must-be-bet
|
||||
*/
|
||||
protected $buffer_size = 5000;
|
||||
protected $buffer_size;
|
||||
|
||||
/**
|
||||
* BuildErrorWriter constructor.
|
||||
|
@ -28,7 +29,8 @@ class BuildErrorWriter
|
|||
*/
|
||||
public function __construct($build_id)
|
||||
{
|
||||
$this->build_id = $build_id;
|
||||
$this->buffer_size = (integer)Config::getInstance()->get('php-censor.build.writer_buffer_size', 500);
|
||||
$this->build_id = $build_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue