schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
335 stars 254 forks source link

Can't use the console when no database available #81

Closed fantoine closed 8 years ago

fantoine commented 9 years ago

I would like to validate my project through SensioLabsInsight but I get issues with this bundle because of the missing of databases on SensioLabsInsight VMs.

The main issue is due to composer scripts (clearCache,...) which call app/console, which load JMSJobQueueBundle, which get doctrine connections on boot, and then try to launch mysql connections.

I already fixed some issues on app/console calls by disabling statistics, but the part on the bundle file is not configurable...

I don't know if I can solve this with some workaround or if the bundle must be updated?

ghost commented 9 years ago

@fantoine read SensioLabsInsights options reference which shows you how to execute custom commands before inspections.

fantoine commented 9 years ago

I solved the issue by using a custom console script for SensioLabsInsights which doesn't extend JMSJob Application.

I also removed references to JMSJobBundle on AppKernel and from configuration files by using SensioLabsInsights pre_composer scripts.

Your fix could be a solution but since it's not on the main branch it's not a solution to use it..

Thx anyway