Hello!
View Slide
github: davydovantontwitter: anton_davydovAnton Davydov
RCNTEC developersidekiq commiterruby doc / rails / crystalOSS one love <3
@rubyunderhood curator https://twitter.com/rubyunderhood
@moscowrbhttp://moscow-rb.org
YouBeer
YouBeerMe
I (we) <3 sidekiq!
Simple, efficient background processing for Ruby.
Sidekiq serverNew thread
I (we) <3 actors!
Manager actor
Fetcher actorsManager actor
RedisFetcher actorsManager actor
RedisFetcher actors Processor actorsManager actor
RedisFetcher actors Processor actorsManager actorWorkers
MyWorker.perform_async
irb > MyWorker.perform_asyncRedis queueSerializationprams
Processor actorsFetcher actorsRedisManager actorWorkers
Processor actorsManager actorWorkersFetcher actorsRedis
WorkersProcessor actorsManager actorFetcher actorsRedis
LongWorkerRedis
RedisSerializationpramsLongWorkerAfter 8 seconds
middleware
Sidekiq.configure_server do |config|config.server_middleware do |chain|chain.add YourMiddleware, optionsendend
def call(worker, msg, queue)# code before call you workeryieldrescue => e# run if your worker is failedraise eensure# run in your worker passed or failedend
Sidekiq-statisticgithub.com/davydovanton/sidekiq-statistic
Improved display of statistics foryour sidekiq workers and jobs.
Worker nameLast job statusRuntimeStart time
Jobs per day charts for each workerLast job status for each workerPassed and failed jobs countAverage job timeMax and min jobs timeTotal jobs timeLast job time
I <3 feedback!
Anton Davydovgithub.com/davydovantontwitter.com/anton_davydovThank you!