ale*_*nco 1 ruby-on-rails sunspot foreman
我安装了Foreman gem,以便每次运行我的应用程序时启动Sunspot:
Procfile:
search: bundle exec rake sunspot:solr:start
Run Code Online (Sandbox Code Playgroud)
这是输出:
alex@alex-K43U:~/rails/inkleak$ foreman start
08:05:09 search.1 | started with pid 5278
08:05:35 search.1 | java version "1.6.0_24"
08:05:35 search.1 | OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~11.10.1)
08:05:35 search.1 | OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
08:05:35 search.1 | Removing stale PID file at /home/alex/rails/inkleak/solr/pids/development/sunspot-solr-development.pid
08:05:35 search.1 | Successfully started Solr ...
08:05:35 search.1 | exited with code 0
08:05:35 system | sending SIGTERM to all processes
SIGTERM received
Run Code Online (Sandbox Code Playgroud)
可能是什么问题呢?
(顺便说一句,当我这么做时,太阳黑子运行得很好rake sunspot:solr:start)
该sunspot:solr:start任务叉SOLR到后台,并立即退出.这与Foreman不兼容,Foreman假设一个长期运行的前台进程.
你想要的是sunspot:solr:run哪个将Solr放在前台,允许Foreman管理这个过程.
或者,如果我可能如此大胆,您可能还会考虑使用云托管的Solr搜索,例如我自己的简单websolr.com.
| 归档时间: |
|
| 查看次数: |
1184 次 |
| 最近记录: |