jkowens / magento-jobqueue

A database backed asynchronous job queue for Magento
MIT License
52 stars 22 forks source link

Jobs fail to run when magento connects to mysql using socket #1

Closed jvaughan closed 11 years ago

jvaughan commented 11 years ago

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().

jkowens commented 11 years ago

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.

jkowens commented 11 years ago

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