Hmm - the delta flag should stay true even after the delta indexing jobs run -
they stay true until the next time all indices are processed.
When you say that the process isn't picking up changes on certain models - is a
job being added to the queue, and the job does nothing? Or is there no job? Or
something else? :)
--
Pat
On 01/03/2011, at 2:30 PM, gmoniey wrote:
> I'm seeing some weird behavior with DelayedJob, and I can't quite
> explain it. For some reason the delayed job process is not picking up
> delta changes on certain models. The delta bit is being correctly set
> across the board, but it stays true (1) for a specific model. The only
> way to fix this is to rebuild the indexes.
>
> My define index looks like:
>
> define_index do
> indexes :first_name, :sortable => true
> indexes :last_name, :sortable => true
> indexes :email, :sortable => true
>
> has :deleted, :owner_id, :phone, :title
> has 'CRC32(owner_table)', :as => :owner_table, :type => :integer
> set_property :delta => :delayed
> set_property :field_weights => {:first_name => 10, :last_name =>
> 7, :email => 5 }
> end
>
> My delayed job worker looks like:
>
> #!/usr/bin/env ruby
> require 'rubygems'
> require 'daemon-spawn'
>
> WORKING_DIR = File.expand_path(File.join(File.dirname(__FILE__),
> '../../..'))
> PID_FILE = File.join("/u/apps/test/shared/pids/", "delayed_job.pid")
>
> class DelayedJobWorker < DaemonSpawn::Base
> def start(args)
> ENV['RAILS_ENV'] ||= args.first || 'development'
> Dir.chdir WORKING_DIR
> require File.join('config', 'environment')
>
> Delayed::Worker.new.start
> end
>
> def stop
> system("kill `cat #{PID_FILE}`")
> end
> end
>
> DelayedJobWorker.spawn!(:log_file => File.join("/u/apps/test/shared/
> log/", "delayed_job.log"),
> :pid_file => PID_FILE,
> :working_dir => WORKING_DIR,
> :app_name => 'delayed_job',
> :sync_log => true,
> :singleton => true,
> :timeout => 5)
>
>
> and my sphinx.yml looks like:
>
> production:
> version: 0.9.9
> mem_limit: 256M
> enable_star: 1
> min_infix_len: 1
> morphology: stem_en
> charset_table: "0..9, A..Z->a..z,a..z, _, -, /, @, !, $, %, ^, &,
> (, ), +, `, ~, #"
> bin_path: "/usr/local/bin"
> config_file: "/u/apps/test/shared/config/production.sphinx.conf"
> searchd_file_path: "/u/apps/test/shared/system/sphinx"
> searchd_log_file: "/u/apps/test/shared/log/searchd.log"
> query_log_file: "/u/apps/test/shared/log/searchd.query.log"
> pid_file: "/u/apps/test/shared/pids/searchd.pid"
>
>
> All the logs look fine, and I'm not sure whats going on. Any ideas on
> why this table is not being queried?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.