Giter Site home page Giter Site logo

Comments (4)

Guikingone avatar Guikingone commented on June 11, 2024

Hi @jvancoillie 👋🏻

Still this issue interesting in your current usages (if you still use this bundle)?

Thanks 🙂

from schedulerbundle.

jvancoillie avatar jvancoillie commented on June 11, 2024

Hi @Guikingone 😛

Sorry for this late return,

I was unable to continue using the bundle. The delivery date of the application on which I used the bundle did not match with the release 1.0.0 of the bundle.

But I think this configuration would be useful for me, what do you think

from schedulerbundle.

ToshY avatar ToshY commented on June 11, 2024

Hey @Guikingone 👋

I'm unsure if I'm having the same issue, but I was following the docs and wanted to specify a Redis DSN, but I'm unable to get this to work.

# services.yaml
parameters:
  redis.dsn.general: '%env(REDIS_DSN_GENERAL)%'
# lock.yaml
framework:
  lock:
    default: '%redis.dsn.general%'
    scheduler: '%redis.dsn.general%'
# scheduler.yaml
scheduler_bundle:
  timezone: UTC
  lock_store: 'lock.scheduler.store'

When doing debug:container store, I get an exception:

  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  The service "scheduler.lock_store.factory" has a dependency on a non-existent service "lock.scheduler.store".

So I tried changing to lock_store: 'lock.default.factory', which gave me an exception in the scheduler

2022-11-18T23:38:52.957009057Z 2022-11-19T00:38:52+01:00 [critical] Uncaught Error: Symfony\Component\Lock\LockFactory::__construct(): Argument #1 ($store) must be of type Symfony\Component\Lock\PersistingStoreInterface, Symfony\Component\Lock\LockFactory given, called in /app/var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php on line 14525
2022-11-18T23:39:19.188351417Z TypeError {#358
2022-11-18T23:39:19.188377556Z   #message: "Symfony\Component\Lock\LockFactory::__construct(): Argument #1 ($store) must be of type Symfony\Component\Lock\PersistingStoreInterface, Symfony\Component\Lock\LockFactory given, called in /app/var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php on line 14525"
2022-11-18T23:39:19.188383637Z   #code: 0
2022-11-18T23:39:19.188385671Z   #file: "./vendor/symfony/lock/LockFactory.php"
2022-11-18T23:39:19.188387675Z   #line: 30
2022-11-18T23:39:19.188389508Z   trace: {
2022-11-18T23:39:19.188391502Z     ./vendor/symfony/lock/LockFactory.php:30 { …}
2022-11-18T23:39:19.188393957Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:14525 {
2022-11-18T23:39:19.188396161Z       ContainerZT6xVhd\App_KernelDevDebugContainer->getScheduler_LockStore_FactoryService()
2022-11-18T23:39:19.188398646Z       › {
2022-11-18T23:39:19.188400559Z       ›     $this->privates['scheduler.lock_store.factory'] = $instance = new \Symfony\Component\Lock\LockFactory(($this->privates['lock.default.factory'] ?? $this->getLock_Default_FactoryService()));
2022-11-18T23:39:19.188402924Z       ›
2022-11-18T23:39:19.188404817Z       arguments: {
2022-11-18T23:39:19.188406661Z         $store: Symfony\Component\Lock\LockFactory {#369 …}
2022-11-18T23:39:19.188408744Z       }
2022-11-18T23:39:19.188410568Z     }
2022-11-18T23:39:19.188412371Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9394 { …}
2022-11-18T23:39:19.188414355Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9336 { …}
2022-11-18T23:39:19.188416449Z     ContainerZT6xVhd\App_KernelDevDebugContainer->ContainerZT6xVhd\{closure}() {}
2022-11-18T23:39:19.188418513Z     ./vendor/guikingone/scheduler-bundle/src/Middleware/MiddlewareRegistry.php:36 { …}
2022-11-18T23:39:19.188420567Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9338 { …}
2022-11-18T23:39:19.188422460Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9365 { …}
2022-11-18T23:39:19.188424574Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9483 { …}
2022-11-18T23:39:19.188426488Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:9012 { …}
2022-11-18T23:39:19.188428431Z     ./var/cache/dev/ContainerZT6xVhd/App_KernelDevDebugContainer.php:3868 { …}
2022-11-18T23:39:19.188440494Z     ./vendor/symfony/console/Command/LazyCommand.php:190 { …}
2022-11-18T23:39:19.188442668Z     ./vendor/symfony/console/Application.php:297 { …}
2022-11-18T23:39:19.188444732Z     ./vendor/symfony/framework-bundle/Console/Application.php:80 { …}
2022-11-18T23:39:19.188446685Z     ./vendor/symfony/console/Application.php:171 { …}
2022-11-18T23:39:19.188448840Z     ./bin/console:43 { …}
2022-11-18T23:39:19.188450763Z   }
2022-11-18T23:39:19.188452607Z }

What am I missing here?

Versions
scheduler-bundle: 0.10
symfony/lock: 6.1.7


Edit

I've defined it in my services.yaml and it seemingly works now.

  lock.scheduler.store:
    class: 'Symfony\Component\Lock\Store\RedisStore'
    arguments:
      - '@app.redis.provider.general'

  app.redis.provider.general:
    class: Redis
    factory: [ 'Symfony\Component\Cache\Adapter\RedisAdapter', 'createConnection' ]
    arguments:
      - '%redis.dsn.general%'
      - { retry_interval: 3, timeout: 30, persistent: 1, tcp_keepalive: 300 }

from schedulerbundle.

Guikingone avatar Guikingone commented on June 11, 2024

Hi @ToshY 👋🏻

Could you create a dedicated issue, just in case, I can take a look and see if it can be improved? 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.