我跟随Properly setting up Redis and Sidekiq in production on Ubuntu 16.04来管理sidekiq worker
我创建了一个文件
if (!recipeQuery.getIngredients().isEmpty()) {
recipeQuery.getIngredients().stream()
.map(i -> Criteria.where("ingredients").regex(recipeQuery.getName(), "i"))
.forEach(query::addCriteria);
}
并添加了以下内容
touch /lib/systemd/system/sidekiq.service
现在我跑步
[Unit]
Description=sidekiq
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/home/deploy/ezlarm-server/current
ExecStart=/home/deploy/.rbenv/shims/bundle exec "sidekiq -e production"
User=deploy
Group=deploy
UMask=0002
Environment=MALLOC_ARENA_MAX=2
RestartSec=1
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sidekiq
[Install]
WantedBy=multi-user.target
出现以下错误
答案 0 :(得分:0)
也许为时已晚,但您是否尝试过sudo systemctl {start,stop,status,restart} sidekiq
遇到相同的问题,但是使用sudo
运行命令就像是一种魅力。谢谢。