jkowens/magento-jobqueue

Jobs fail to run when magento connects to mysql using socket

jvaughan opened this issue · 2 comments

Hi,

Thanks for the very useful module!

I found that jobs silently fail to run when magento is configured to connect to mysql using a socket, eg (in local.xml):

<default_setup>
  <connection>
    <host><![CDATA[/Applications/MAMP/tmp/mysql/mysql.sock]]></host>
    ...
  </connection>
</default_setup>

I presume that these values are not valid when parsed as arguments in Worker::setupDJJob().

Hey thanks, good catch. You're right Worker::setupDJJob() needs to be updated to build the connection string differently depending on whether $config->host is a hostname or filepath to a socket. Hopefully I'll have some time to tinker with this over the weekend.

If anyone knows of a way of getting a standard PDO object out of Magento to pass to DJJob please let me know!