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 |
- added customer (with address and phone), invoices, payments to old and existing invoices.
- ran sync from Dashboard
- Dashboard counts
Account.current.xero_synchronizing = true
: Dash sync is not returning xero_sync'ing to false- reloading the Dashboard, counters have not gone down
Account.current.xero_syncs.last
is not the current sync !!! ... the current sync hasn't been created- main
xero.log
has logged that the sync has been completed - the
Customer.last.xero_id = nil
- the
Invoice.last.xero_id = nil
- no Resque error
running sync on App Server worked apart from Customer
-need to check if customer phone / address is initially synced : it was sync'd on the first sync
Tried changing the App/ Utility queues so that xero sync job was picked up on App Server (changed resque_*.conf files, restarted workers with monit)
result: exactly the same behaviour as when Utility server picked up job: logger logs action, including SYNC COMPLETE !
message, but then fails to update account to xero_synchronizing = false
, and no xero_entities have been created.
have reverter to Utility doing xero_jobs
Note there are two redis things running in sudo monit summary
on App Server :
The Monit daemon 5.0.3 uptime: 2d 16h 36m
Process 'resque_SpannerPlanner_0' running
Process 'resque_SpannerPlanner_1' running
Process 'redis-1' running
Process 'redis' not monitored
Process 'nrsysmond' running
Process 'mini_httpd' running
Process 'memcache_11211' running
System 'domU-12-31-39-03-4D-73' running
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
c = Customer.last
,Customer.active.out_of_sync.include? c == true
And, customer exists on Xero BUT their phone number hasn't been uploaded => the will continue to appear in the dash un-synced