ruby

Monitoring ConnectWise MSMQ queues

Tagged:  

Something I put together to check the ConnectWise MSMQ queues so that I know when Outlook Sync is having issues. The follow code is ruby (because I really like ruby), but could probably be adapted to a Microsoft language. It will require the MSMQ feature to be installed on the server where you run the code.

Something I put together to check the ConnectWise MSMQ queues so that I know when Outlook Sync is having issues. The follow code is ruby (because I really like ruby), but could probably be adapted to a Microsoft language. It will require the MSMQ feature to be installed on the server where you run the code.

require 'rubygems'
require 'mail'
require 'win32ole'

Mail.defaults do
    delivery_method :smtp, {:address => "mailserver", :port => 25}
end

man = WIN32OLE.new('MSMQ.MSMQManagement')
man.Init("CW-SERVER","",    

FasterCSV -> CSV for ruby 1.8 -> 1.9 and rails 3.0

Tagged:  

Ran into an issue with a rails 3.0 app which I had running on ruby 1.9 and am now getting to run on ruby 1.8. The app pulls in data from some CSV files and used the CSV library in ruby 1.9. All the CSV data imports failed under ruby 1.8. A little research showed that this is because CSV in ruby 1.9 was FasterCSV in ruby 1.8, and the CSV class in ruby 1.8 was something completely different. So I got around this by doing the following:

Add a conditional include of fastercsv to the Gemfile:

gem 'fastercsv', :platforms => :ruby_18

Syndicate content