Running delayed_job as a windows service

后端 未结 1 809
死守一世寂寞
死守一世寂寞 2021-01-13 03:58

I am trying to get delayed_job working as a windows service.

I am so thoroughly sick of windows I can\'t even begin to put it into words, but I am stuck with it for

1条回答
  •  执笔经年
    2021-01-13 04:29

    I did this by:

    1. Copying srvany.exe from the Windows Resource Kit to C:\windows\system32.

    2. Creating an empty service using sc create JobQueue binPath= "C:\windows\system32"

    3. Adding a registry key called Parameters to the service registry key located at HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > services > JobQueue

    4. Adding the following three string values to the new registry key.

    As below:

    Application="c:\ruby193\bin\ruby.exe"
    AppDirectory="$PATH_TO_RAILS_APP"
    AppParameters="c:\ruby193\bin\rake jobs:work RAILS_ENV=$ENVIRONMENT"
    

    0 讨论(0)
提交回复
热议问题