I am using Rails Active Job with Resque and I don't want to schedule twice the same job (same arguments). Job is triggered by user.
How can check this before performing the job?
There is a likely a reason that this is not super straightforward - it is worth making jobs idempotent, so that they can be run multiple times. If a job fails or restarts, it may end up running again.
https://github.com/mperham/sidekiq/wiki/Best-Practices#2-make-your-job-idempotent-and-transactional (I am more used to sidekiq than resque, but the principles are the same)
A better way of structuring it might be for the job to store a value somewhere in the database, and for the job to read that value and determine whether it should perform an action or exit early.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With