Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codedmonkey committed Jul 25, 2024
1 parent 91e0ae3 commit 0a10307
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RUN set -e; \
postgresql \
supervisor; \
ln -s /usr/sbin/php-fpm82 /usr/sbin/php-fpm; \
mkdir -p /run/postgresql; \
mkdir -p /run/postgresql /srv/config; \
chown -R conductor:conductor /run /srv;

COPY --from=build /usr/bin/composer /usr/bin/composer
Expand Down
4 changes: 2 additions & 2 deletions docker/process/postgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

function shutdown()
{
pkill pg_ctl
pkill postgres
}

if [ ! -d "/srv/data/postgresql" ]; then
Expand All @@ -14,4 +14,4 @@ fi

trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP

exec pg_ctl start -D /srv/data/postgresql
exec postgres -D /srv/data/postgresql
6 changes: 3 additions & 3 deletions src/Doctrine/EventListener/RegistryListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function prePersist(Registry $registry, PrePersistEventArgs $event): void
{
$repository = $event->getObjectManager()->getRepository(Registry::class);

$registry->mirroringPriority = $repository->count([]) + 1;
$registry->setMirroringPriority($repository->count([]) + 1);
}

public function preRemove(Registry $registry, PreRemoveEventArgs $event): void
Expand All @@ -25,8 +25,8 @@ public function preRemove(Registry $registry, PreRemoveEventArgs $event): void
$registries = $repository->findAll();

foreach ($registries as $existingRegistry) {
if ($existingRegistry->mirroringPriority > $registry->mirroringPriority) {
$existingRegistry->mirroringPriority--;
if ($existingRegistry->getMirroringPriority() > $registry->getMirroringPriority()) {
$existingRegistry->setMirroringPriority($existingRegistry->getMirroringPriority() - 1);

$repository->save($existingRegistry);
}
Expand Down

0 comments on commit 0a10307

Please sign in to comment.