Giter Site home page Giter Site logo

Comments (10)

Guikingone avatar Guikingone commented on June 2, 2024 1

Alright, could you test it against dev-issue/152? Thanks again and sorry for the bug πŸ™‚

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 2, 2024 1

I am very well thank you.

You're too fast, I was investigating and indeed, by deleting the SchedulerCacheClearer registration it works ...

private function registerKernelDependencies(ContainerBuilder $container): void
{
$container->register(SchedulerCacheClearer::class, SchedulerCacheClearer::class)
->setArguments([
new Reference(SchedulerInterface::class, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE),
])
->setPublic(false)
->addTag('kernel.cache_clearer')
->addTag('container.preload', [
'class' => SchedulerCacheClearer::class,
])
;
}

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 2, 2024 1

Ho yes, when I say without database it means that at the time of the docker build I do not yet have the database container. I have the following transport configuration in the configuration file

scheduler_bundle:
    transport:
        dsn: 'doctrine://default?execution_mode=first_in_first_out&table_name=scheduler_tasks&auto_setup=false'

I also have the configuration of the database version in the .env as specified in the symfony troubleshooting documentation
https://symfony.com/doc/current/cloud/troubleshooting.html#sqlstate-hy000-2002-connection-refused-during-the-build-step

from schedulerbundle.

Guikingone avatar Guikingone commented on June 2, 2024 1

Hi @jvancoillie πŸ‘‹πŸ»

Thanks, I'm gonna release it via 0.5.3 πŸ™‚

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 2, 2024

a little more information with the stack trace

In PDOConnection.php line 39:

  [PDOException (2002)]
  SQLSTATE[HY000] [2002] Connection refused


Exception trace:
  at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:39
 PDO->__construct() at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:39
 Doctrine\DBAL\Driver\PDOConnection->__construct() at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:25
 Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:400
 Doctrine\DBAL\Connection->connect() at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1940
 Doctrine\DBAL\Connection->getWrappedConnection() at /var/www/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1278
 Doctrine\DBAL\Connection->executeQuery() at /var/www/app/vendor/guikingone/scheduler-bundle/src/Bridge/Doctrine/Transport/Connection.php:369
 SchedulerBundle\Bridge\Doctrine\Transport\Connection->executeQuery() at /var/www/app/vendor/guikingone/scheduler-bundle/src/Bridge/Doctrine/Transport/Connection.php:157
 SchedulerBundle\Bridge\Doctrine\Transport\Connection->create() at /var/www/app/vendor/guikingone/scheduler-bundle/src/Bridge/Doctrine/Transport/DoctrineTransport.php:82
 SchedulerBundle\Bridge\Doctrine\Transport\DoctrineTransport->create() at /var/www/app/vendor/guikingone/scheduler-bundle/src/Scheduler.php:92
 SchedulerBundle\Scheduler->schedule() at /var/www/app/var/cache/dev/ContainerVQV8FEe/App_KernelDevDebugContainer.php:8975
 ContainerVQV8FEe\App_KernelDevDebugContainer->getSchedulerService() at /var/www/app/var/cache/dev/ContainerVQV8FEe/App_KernelDevDebugContainer.php:8677
 ContainerVQV8FEe\App_KernelDevDebugContainer->getSchedulerCacheClearerService() at /var/www/app/var/cache/dev/ContainerVQV8FEe/App_KernelDevDebugContainer.php:721
 ContainerVQV8FEe\App_KernelDevDebugContainer->ContainerVQV8FEe\{closure}() at /var/www/app/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php:35
 Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer->clear() at /var/www/app/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:114
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /var/www/app/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /var/www/app/vendor/symfony/console/Application.php:989
 Symfony\Component\Console\Application->doRunCommand() at /var/www/app/vendor/symfony/framework-bundle/Console/Application.php:96
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/app/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at /var/www/app/vendor/symfony/framework-bundle/Console/Application.php:82
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/app/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at /var/www/app/bin/console:43

from schedulerbundle.

Guikingone avatar Guikingone commented on June 2, 2024

Hi @jvancoillie πŸ‘‹πŸ» , I'm fine thanks you and you?

It seems related to the recently added SchedulerCacheClearer: https://github.com/Guikingone/SchedulerBundle/blob/main/src/CacheClearer/SchedulerCacheClearer.php

If you use a external connection and the connection is not available, an error is thrown, I'm gonna fix this, the solution could be to remove the CacheClearer.

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 2, 2024

same issue with dev-issue/152

Capture d’écran 2021-06-18 aΜ€ 17 43 26

from schedulerbundle.

Guikingone avatar Guikingone commented on June 2, 2024

Alright, small question, when you say without database, have you configured the transport in the configuration?

from schedulerbundle.

Guikingone avatar Guikingone commented on June 2, 2024

I just removed the cache clearer, could you test it when you have a moment? thanks πŸ™‚

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 2, 2024

Hi @Guikingone πŸ‘‹

I just tested dev-issue / 152 and it works as expected.

Thanks πŸ‘

from schedulerbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.