Skip to content

Instantly share code, notes, and snippets.

@Toady00
Last active August 29, 2015 14:04
Show Gist options
  • Save Toady00/38ed354da67e96a5e08a to your computer and use it in GitHub Desktop.
Save Toady00/38ed354da67e96a5e08a to your computer and use it in GitHub Desktop.
TB Singleton jobs that aren't
# app 1 logs
Jul 18 15:14:19 prod-app-01 -: **** CardApprovalMailer Starting ****
Jul 18 15:14:19 prod-app-01 -: **** CardApprovalMailer Finished ****
# app 2 logs
Jul 18 15:14:49 prod-app-02 -: **** CardApprovalMailer Starting ****
Jul 18 15:14:49 prod-app-02 -: **** CardApprovalMailer Finished ****
# app 3 logs
Jul 18 15:14:51 prod-app-03 -: **** CardApprovalMailer Starting ****
Jul 18 15:14:51 prod-app-03 -: **** CardApprovalMailer Finished ****
# torquebox log from prod-app-01, which is the domain controller
# 10.0.1.85 is prod-app-02
# 10.0.1.239 is prod-app-03
AS010918: Registered remote slave host "10.0.1.85", JBoss AS 7.2.x.slim.incremental.16 "Janus"
AS010918: Registered remote slave host "10.0.1.239", JBoss AS 7.2.x.slim.incremental.16 "Janus"
# job def in config/torquebox.rb
TorqueBox.configure do
# ...
job CardApprovalMailer do
name 'card.approval_mailer'
# Fire every 15 minutes
cron '0 */15 * * * ?'
timeout '120s'
singleton true
end
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment