Skip to content

Commit dcc9e5e

Browse files
committed
fix: fix key error issue
1 parent bdfa207 commit dcc9e5e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app/jobs/telegram_background_worker_job.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class TelegramBackgroundWorkerJob < ApplicationJob
1010

1111
def perform(args)
1212
Rails.logger.info "Performing telegram background job: #{args}"
13-
action = args.fetch("action")
13+
action = args.fetch(:action)
1414

1515
case action
1616
when PostAction::BAN_USER
17-
trained_message = args.fetch("trained_message")
17+
trained_message = args.fetch(:trained_message)
1818
ban_user_in_group(trained_message: trained_message)
1919
when PostAction::DELETE_ALERT_MESSAGE
20-
chat_id = args.fetch("chat_id")
21-
message_id = args.fetch("message_id")
20+
chat_id = args.fetch(:chat_id)
21+
message_id = args.fetch(:message_id)
2222
delete_message(chat_id: chat_id, message_id: message_id)
2323
end
2424
end

config/deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ servers:
99
web:
1010
hosts:
1111
- 192.168.1.188
12-
# job:
13-
# hosts:
14-
# - 192.168.1.188
15-
# cmd: bin/jobs
12+
job:
13+
hosts:
14+
- 192.168.1.188
15+
cmd: bin/jobs
1616

1717
# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
1818
# Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer.
@@ -36,10 +36,10 @@ registry:
3636
env:
3737
secret:
3838
- RAILS_MASTER_KEY
39-
clear:
39+
# clear:
4040
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
4141
# When you start using multiple servers, you should split out job processing to a dedicated machine.
42-
SOLID_QUEUE_IN_PUMA: true
42+
# SOLID_QUEUE_IN_PUMA: true
4343

4444
# Set number of processes dedicated to Solid Queue (default: 1)
4545
# JOB_CONCURRENCY: 3

0 commit comments

Comments
 (0)