I am trying to display the next time an email is scheduled using any or all of the below arguments as inputs. I'm using resque, resque-scheduler and resque-mailer.
For example, above are the delayed jobs as displayed in the resque web interface. So I'd like to input "game_starting_reminder" and/or 226 and/or "Beat Box" and be able to then display the timestamp as such:
"Next scheduled email: 2017-10-31 at 9:30 pm".
However, when I try to call for the information in the console, the below is the output I receive
I've tried extending the delay_extensions and methods and using the find_delayed_selection method but that doesn't seem to work. For example this:
[18] pry(main)> Resque.find_delayed_selection { |job| job["class"] == QuizMailer}
TypeError: no implicit conversion of String into Integer
Or this:
[32] pry(main)> Resque.find_delayed_selection { {
[32] pry(main)* "class": "QuizMailer",
[32] pry(main)* "args": ["game_starting_reminder", [226, "Beat Box"]],
[32] pry(main)* "queue": "mailer"
[32] pry(main)* }}
=> ["{\"class\":\"QuizMailer\",\"args\":[\"game_starting_reminder\",[226,\"Beat Box\"]],\"queue\":\"mailer\"}",
"{\"class\":\"QuizMailer\",\"args\":[\"game_ending_reminder\",[226,\"Beat Box\"]],\"queue\":\"mailer\"}"]
Any other method I can use here? Or tips. Thank you!