Adding messages to a queue server from a model method

All,
I’m trying to add/‘set’ values in the sparrow queue server (http://
Google Code Archive - Long-term storage for Google Code Project Hosting.) which is very similar to Starling. I can
add values to the queue easily from an irb session or independent
script, but not from a model method. What do I need to do to make
this work?

####################################
What I used in the script and irb session:

require ‘rubygems’
require ‘memcache’
m = MemCache.new(‘127.0.0.1:11212’)
m[‘queue_name’] = ‘1’ # Publish to queue

####################################

Example Model Test:

class Exmaple < ActiveRecord::Base

def experiment

require ‘memcache’

m = MemCache.new(‘127.0.0.1:11212’)

m[‘queue_name’] = ‘1’

end

end

Thanks!
–Nick