Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper sidekiq usage #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'slim-rails'
# gem 'therubyracer', platforms: :ruby
gem 'therubyracer', platforms: :ruby

gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
libv8 (3.16.14.11)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
Expand Down Expand Up @@ -161,6 +162,7 @@ GEM
redis (3.2.1)
redis-namespace (1.5.2)
redis (~> 3.0, >= 3.0.4)
ref (2.0.0)
sass (3.4.19)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
Expand Down Expand Up @@ -195,6 +197,9 @@ GEM
persistent_httparty
virtus
temple (0.7.6)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
Expand Down Expand Up @@ -233,5 +238,6 @@ DEPENDENCIES
slim-rails
sqlite3
telegram-bot-ruby
therubyracer
uglifier (>= 1.3.0)
web-console (~> 2.0)
2 changes: 1 addition & 1 deletion app/models/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class Message < ActiveRecord::Base
private

def send_telegram_message
TelegramBotWorker.new.perform_async(text)
TelegramBotWorker.perform_async(text)
end
end
2 changes: 1 addition & 1 deletion app/workers/telegram_bot_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class TelegramBotWorker
TOKEN = ENV['TELEGRAM_BOT_TOKEN']
CHANNEL = ENV['TELEGRAM_BOT_CHANNEL']

def perform_async(message)
def perform(message)
puts TOKEN
puts CHANNEL

Expand Down