Skip to content

Commit

Permalink
IBX-6173: Added indexes to ezcontentobject_attribute and ezurl_object…
Browse files Browse the repository at this point in the history
…_link tables
  • Loading branch information
mateuszdebinski authored Aug 21, 2023
1 parent 20bebf9 commit a53f741
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 322 deletions.
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.exclusions=**/Tests/**/_fixtures/*
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ tables:
sort_key_string: { fields: [sort_key_string], options: { lengths: ['191'] } }
ezcontentobject_attribute_language_code: { fields: [language_code] }
sort_key_int: { fields: [sort_key_int] }
ezcontentobject_attribute_co_id_ver: { fields: [contentobject_id, version] }
id:
id: { type: integer, nullable: false, options: { autoincrement: true } }
version: { type: integer, nullable: false, options: { default: '0' } }
Expand Down Expand Up @@ -547,6 +548,7 @@ tables:
ezurl_ol_coa_id: { fields: [contentobject_attribute_id] }
ezurl_ol_url_id: { fields: [url_id] }
ezurl_ol_coa_version: { fields: [contentobject_attribute_version] }
ezurl_ol_coa_id_cav: { fields: [contentobject_attribute_id, contentobject_attribute_version] }
fields:
contentobject_attribute_id: { type: integer, nullable: false, options: { default: '0' } }
contentobject_attribute_version: { type: integer, nullable: false, options: { default: '0' } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class RepositoryAuthenticationProvider extends DaoAuthenticationProvider impleme
{
use LoggerAwareTrait;

private const USLEEP_MULTIPLIER = 1000000;

/** @var float|null */
private $constantAuthTime;

Expand Down Expand Up @@ -114,7 +116,9 @@ private function sleepUsingConstantTimer(float $startTime): void

$remainingTime = $this->constantAuthTime - (microtime(true) - $startTime);
if ($remainingTime > 0) {
usleep($remainingTime * 1000000);
$microseconds = $remainingTime * self::USLEEP_MULTIPLIER;

usleep((int)$microseconds);
} elseif ($this->logger) {
$this->logger->warning(
sprintf(
Expand Down
Loading

0 comments on commit a53f741

Please sign in to comment.