basic use of sidekiq(2)
来源:互联网 发布:windows系统官网电脑版 编辑:程序博客网 时间:2024/05/17 23:23
此处接上一条博客
vim Gemfile
source "https://rubygems.org"gem "sidekiq"gem 'rack-protection'gem "sinatra"
vim config.ru
<pre name="code" class="ruby">require 'sidekiq'require 'rack-protection'Sidekiq.configure_client do |config| config.redis = { db: 1 } endrequire 'sidekiq/web'run Sidekiq::Web
执行
$ rackup
打开管理页面就可以看到了所有的任务了
http://localhost:9292/
可以在sidekiq启动的时候存入任务进程号
$ bundle exec sidekiq -r ./worker.rb -P ~/tmp/sidekiq.pid
$cat ~/tmp/sidekiq.pid1198
$ ps -ax | grep sidekiq 1198 pts/28 Sl+ 0:00 sidekiq 4.1.1 [0 of 25 busy] 1259 pts/33 S+ 0:00 grep --color=auto sidekiq
$ sidekiqctl --helpsidekiqctl - stop a Sidekiq process from the command line.Usage: sidekiqctl <command> <pidfile> <kill_timeout> where <command> is either 'quiet' or 'stop' <pidfile> is path to a pidfile <kill_timeout> is number of seconds to wait until Sidekiq exits (default: 10), after which Sidekiq will be KILL'dBe sure to set the kill_timeout LONGER than Sidekiq's -t timeout. If you wantto wait 60 seconds for jobs to finish, use `sidekiq -t 60` and `sidekiqctl stop path_to_pidfile 61`
$ sidekiqctl stop ~/tmp/sidekiq.pid Sidekiq shut down gracefully.
0 0
- basic use of sidekiq(2)
- basic use of sidekiq (2)
- basic use of sidekiq
- AnAndroid basic components use
- Linux:vim basic use
- Notice: Use of undefined constant INTL_ICU_VERSION - assumed 'INTL_ICU_VERSION' in D:\work\WWW\basic
- 深入理解openstack网络架构(2)----Basic Use Cases
- Diving into OpenStack Network Architecture - Part 2 - Basic Use Cases
- rails-sidekiq
- sidekiq入门
- sidekiq 错误
- Basic of Project Management
- Basic Of Multi-Threads
- Basic Example Of RTimer
- Basic configuration of Products
- Basic Example Of RTimer
- Basic Concepts of Statistic
- Basic of HTML
- Realm for Android 快速入门
- R0与R3联调
- ListView源码解析
- C#中移除自定义事件的所有方法
- openssl双向验证
- basic use of sidekiq(2)
- Android程序中价格的处理
- 使用sui 实现自动补全功能
- For UPDATE 语句
- JNI/NDK开发指南(四)——字符串处理
- sqlite3不同编译器编译问题
- 几何变换详解
- 花指令
- iOS 地图定位