Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kuroko2 scheduler, processor, executor service
[Unit]
Description=Kuroko2 executor
[Service]
Environment=LANG=ja_JP.UTF-8
Environment=RAILS_ENV=production
Environment=NUM_WORKERS=2
Environment=QUEUE=@default
User=<user_name>
WorkingDirectory=<kuroko2プロジェクトのディレクトリ>
ExecStart=/usr/local/rbenv/shims/bundle exec rails runner 'Kuroko2::Servers::CommandExecutor.new.run'
ExecStop=/bin/kill -QUIT `/bin/cat <executerのpid fileのpath>`
KillMode=process
PIDFile=<executerのpid fileのpath>
[Install]
WantedBy=multi-user.target
[Unit]
Description=Kuroko2 processor
[Service]
Environment=LANG=ja_JP.UTF-8
Environment=RAILS_ENV=production
User=<user_name>
WorkingDirectory=<kuroko2プロジェクトのディレクトリ>
ExecStart=/usr/local/rbenv/shims/bundle exec rails runner 'Kuroko2::Servers::WorkflowProcessor.new.run'
ExecStop=/bin/kill -QUIT `/bin/cat <processorのpid fileのpath>`
KillMode=process
PIDFile=<processorのpid fileのpath>
[Install]
WantedBy=multi-user.target
[Unit]
Description=Kuroko2 scheduler
[Service]
Environment=LANG=ja_JP.UTF-8
Environment=RAILS_ENV=production
User=<user_name>
WorkingDirectory=<kuroko2プロジェクトのディレクトリ>
ExecStart=/usr/local/rbenv/shims/bundle exec rails runner 'Kuroko2::Servers::JobScheduler.new.run'
ExecStop=/bin/kill -QUIT `/bin/cat <schedulerのpid fileのpath>`
KillMode=process
PIDFile=<schedulerのpid fileのpath>
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.