similar to: cross thread violation

Displaying 20 results from an estimated 3000 matches similar to: "cross thread violation"

2006 Oct 07
3
blog_id magic with typo
Hi All, I am modifying typo so as, I can host multiple blogs on the same typo. And its almost done, except that...i am stuck at one place. When a user posts a new article, depending upon current blog_id, I would like to set the blog_id attribute of @article object. So..in the admin/content_controller.rb: We have: def new_or_edit if request.post? set_article_author
2006 Dec 15
3
how to install from svn?
When trying to run Chris samples I get error: /usr/lib/ruby/gems/1.8/gems/mocha-0.3.2/lib/smart_test_case.rb:3: uninitialized constant Test (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /usr/lib/ruby/gems/1.8/gems/mocha-0.3.2/lib/mocha.rb:1 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:33:in
2006 Nov 07
2
start a worker when bdrb starts
I am sure..again I am missing something, but I am trying to start a worker, when backgroundrb starts and it doesn''t seem to work. Here is my config/backgroundrb_schedules.yml file: feed_worker: class: feed_worker job_key: feed_worker_key worker_method: do_work trigger_args: repeat_interval: 20.minutes I even tried this from Rails controller: # def start_feed_worker #
2006 Dec 15
5
Testing event driven Socket classes
Ok, here is the class, I want to Unit Test, its part of a large app and is based on EventMachine library. I want to mock the class TickServer ( i.e not stub it) . Since in actual scenario, you can''t do this on this class: @server = TickServer.new # will toss an exception at your face you must initialize the server like this: EventMachine.run {
2006 Dec 06
0
Testing your workers
This has been asked before, never well attended perhaps. Any thoughts on testing your workers? Current implementation is broken. An empty test case like this: require File.dirname(__FILE__) + ''/../test_helper'' require "#{RAILS_ROOT}/lib/workers/market_summary_worker" require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib/backgroundrb.rb" require
2006 Nov 05
5
backgroundrb preview
Hi Ezra/skaar, Wow man, the exercise was worth it. The connection closed problem with socket as i mentioned in my earlier mails...completely disappeared, and now i can connect only once to the socket and keep reading..till end of its days. Literally impossible with older release of backgroundrb. This could also potentially solve the issues people were having with ActiveRecord. As i said
2006 Oct 12
2
Too Many Mysql connections
In my app, for three models: foo,bar and baz, the database connection is made to a different database and hence in model code: class Foo < ActiveRecord::Base establish_connection :diff_database end class Bar < ActiveRecord::Base establish_connection :diff_database end class Baz < ActiveRecord::Base establish_connection :diff_database end Now, the problem is, if is use the above
2007 Apr 04
2
unit tests?
Ezra et al: I have this problem: http://rubyforge.org/pipermail/backgroundrb-devel/2006-December/000578.html Any progress on it? Or are unit tests simply impossible for now? -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
2006 Nov 21
0
small tip for killing workers
People are still using cron jobs for killing one shot workers. I mean...workers, which they want to run only once. I guess putting a "exit 0" at the end of do_work is a better solution. I use it and works great. -- There was only one Road; that it was like a great river: its springs were at every doorstep, and every path was its tributary.
2006 Oct 25
0
Really long running worker threads and monitoring them
Hi, I have been using Backgroundrb for quite sometime...and now...as i guess its a known problem that...worker threads throw up..."Mysql Connection has Gone away" error..when they run for really long time. Is there any conclusive workaround or solution. If not..and let''s say...my worker threads are not critically important for my app....then which program you guys are using
2006 Sep 19
0
worker threads written in rubyinline
Hey Ezra, I asked this on ruby-talk, but probably you missed it. I am already using Backgroundrb for several other stuff. But i am curious, that how it will work with rubyinline? Ruby threads, should handle it alright..theoretically(since backgroundrb uses ruby threads) But, i would just ask opinions of Ezra on this. Because i feel, stuff at my end needs some real optimization. These worker
2006 Oct 11
0
storing typo sessions in memcache
I was trying to use memcache for session storage in Typo. And i got following error, when user logs into the system. Session ID: Cookie set: is_admin=yes; path=/ Redirected to http://foobar.com:8002/admin/content Completed in 0.02042 (48 reqs/sec) | DB: 0.00236 (11%) | 302 Found [http://foobar.com/accounts/login] undefined class/module User
2006 Apr 07
0
webrick, cross-thread violation on rb_thread_schedule()
Hi all, Anyone else seen this? Although it happened while serving Rails, I figured a core dump caused by webrick should be posted to ruby-talk as well. It happened after I hit Ctrl-C to kill the webrick server, after a failed attempt to invoke a web service through a web page. Below are the last two log entries from the development.log file. Any ideas? Dan >/opt/bin/ruby
2008 May 23
0
Backgroundrb-devel Digest, Vol 24, Issue 7
Hi, all. Just wondering if anyone has tried using the Paperclip file upload plugin with Backgroundrb. My current implementation uses attachment_fu - I save the file initially to the file system without generating thumbs, then a bdrb process picks up that file, generates thumbs, and saves to S3. This works fine and dandy, the only hitch is I want to save image metadata in the same table
2007 Mar 05
2
Scheduled workers only run once unless you call self.delete inside the worker
I had a worker scheduled to run every minute with backgroundrb_schedules.yml: ebay_runner: :class: :ebay_auction_worker :job_key: :ebay_auction_runner :trigger_type: :cron_trigger :trigger_args: 0 * * * * * * This worker posts an auction to eBay from a queue of auctions every minute. I was having a problem where the worker would run ok the first time, but never any subsequent minutes
2006 Nov 30
4
Mongrel Cluster init.d problems
I have installed mongrel and mongrel_cluster fine and have them running great with my app. I tried using the init.d script provided with mongrel_cluster 2.1 to start it up on boot but it doesn''t. mongrel_cluster_ctl works fine for me by hand and so does /etc/init.d./mongrel_cluster start. I am on Debian so I installed the service links with sudo update-rc.d mongrel_cluster defaults. And
2007 Apr 18
5
[BUG] worker stopping abruptly
I have been facing this damn ugly issue since quite sometime. So this worker reads RSS feed from Yahoo news and stores it in a DB. The worker is scheduled to run at every 40 minutes and my background_schedules.yml looks like this: feed_worker: :class: :feed_worker :job_key: :feed_worker_key :worker_method: :do_work :trigger_args: :start: <%= Time.now + 5 %>
2008 Jan 04
1
Updates and Fixes on Trunk
Hi, I am pushing some updates and fixes that addresses much of the issues that we talked about since last couple of days. 1. Use configuration option :debug_log: false to disable backgroundrb_debug.log. 2. As shown below, use lazy_load option to disable aggressive loading of models ( and somewhat stupid too). 3. MiddleMan.delete_worker(:worker => :foo_worker) will now ABORT the worker, it
2006 Nov 27
5
win32 problems
I''m setting up a Rails app for a client that uses Windows. I''m getting this error: c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/lib/mongrel/rails.rb: 32: uninitial ized constant Mongrel::HttpHandler (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:21:in `re quire'' from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/bin/
2007 Dec 17
1
Some more updates, enhancements and fixes
Hi Folks, Well, Yesterday I pushed some more updates that I was cooking since last couple of days. Here is a brief list: 1. Results from worker stays even after a worker dies. 2. You can ask backgroundrb to store status objects in memcache cluster now. by default its stored in master process memory, but I have introduced an option to allow it to be stored in a memcache cluster: