2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[ActiveJob]Jobの中でbinding.pryする方法

Last updated at Posted at 2022-02-12

binding.pry in Job

Jobの中をデバッグしたいのにできない。
そんな僕のために記事を残します。

2種類

1. perform_now

Jobのperformメソッドがperform_laterメソッドから呼び出されていたら

一時的に_nowに変えればOK!

すぐにJobを実行させることでpryができるようになる

.perform_now

2. アダプタのコンテナに接続する

dockerで開発されている方限定になってしまいますが、

sidekipなどの使用しているアダプターのコンテナに接続すればOKです!

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?