Created
September 25, 2014 03:25
-
-
Save mixmix/5ede408dae22b603d872 to your computer and use it in GitHub Desktop.
run sync_all & log to specific file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subdomain = 'nzdemo1' | |
Storey.switch subdomain | |
account = Account.current | |
owner = account.owner | |
custom_log_name = "xero-mix-#{subdomain}" | |
custom_logger = Xero::Logger.new "#{Rails.root}/log/#{custom_log_name}.log" | |
custom_connection = Xero::Connection.new owner, Xero::ApplicationFactory.new, custom_logger | |
xs = Xero::Service.new owner, connection: custom_connection | |
xs.renew_xero_token | |
xs.sync_all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note there are two redis things running in
sudo monit summary
on App Server :