similar to: Pessimistic locking locks the entire table?

Displaying 20 results from an estimated 4000 matches similar to: "Pessimistic locking locks the entire table?"

2009 Oct 04
3
Problem using ActiveRecord find with :joins and :select
Hi guys, When I do: temp = User.find(:all, :joins => "INNER JOIN contents ON users.agent_id = contents.id", :select => "contents.id, users.id, users.u_date") temp.first.inspect It seems to work fine, but it only returns: #<User id: 6, u_date: "2009-10-03 19:32:23"> but not the contents.id information. I
2013 Jan 03
6
How to avoid simple race conditions with Session?
Here is the situation: - the client makes a request - it is followed by AJAX polling The server needs to keep track of some stuff during this process. I have been using the Session and it "mostly" works… until the user decides to open another tab in her browser and she makes a new, parallel request. In this case, the data from the two requests is merged, which leads to bugs. This got
2013 Feb 25
3
ActiveRecord associations: design question
Hi guys, In my Rails app, I have three models: A, B and C, with the following relationships: - B hasMany C - C belongsTo B I would like A to "has_one" instance of B+C. By that I mean A needs to be linked to a specific instance of B AND a specific instance of C. My first guess would be to create a fourth object, say B_plus_C that would: - belongs to B - belongs to C - belongs to A Is
2006 Jul 07
1
Pessimistic Locking Plugin Breaks ActiveRecord::Base.count()
After installing the PessimisticLocking plugin I noticed that ActiveRecord''s count method no longer works (see below). If I remove the plugin it resolves the problem. I need both. Any ideas? I have also read that Pessimistic Locking is now baked into ActiveRecord in Edge Rails. I have tried Rails 1.1.2 and 1.1.4 and that doesn''t seem to be the case. Any idea when
2012 May 22
3
[RESQUE]Question about queues
I run Resque with x ''general'' queues. With ''general'' I mean a queue that may run every type of Worker. Or in the Rake command: COUNT=x QUEUE=* rake resque:work When a worker runs a job of a specific class, it may not run another job of the same class simultaniously. This job has to wait until the previous job has finished before it may start. BTW The reason
2011 Aug 13
1
How do I disable auto-logout ....
.... I have a 64-bit CentOS 5.6 VM running on a 64-bit FC14 host. I notice that it has an automatic logout feature after a period of idleness, see below: [wam at centos-5, CFD, 5:52:45pm] 1183 % ll -tr LIST LIST.Update /usr/local/bin/P* /usr/local/bin/*WAM* ; ps -u wam -lf ; uname -a ; date ls: No match. F S UID PID PPID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD 5 S
2011 Jan 24
1
passing multiple arguments in resque scheduler
Hi, I have implemented resque scheduler in my application by looking at example here https://github.com/bvandenbos/resque-scheduler. I have configured resque_schedule.yml file, and in that I can pass arguments to the resque job. My requirement is to pass more than one arguments to the queueing resque job. If we consider the example given, clear_leaderboards_contributors: cron: "30 6 * *
2012 Apr 10
2
how to use cronjob
hey everyone i want to send mails by scheduling the time dynamically.lets say in a single table i have all the employee logs who came at different timings.they are from different locations and departments. i want to send mails to different mails ids according to there location to there HR. can i do this with cron job. thanks in advance -- You received this message because you are subscribed to
2011 Jan 15
4
Best practices for email delivery in production
In pre Rails 3 world I was using ar_sendmail to queue up emails. Then I would setup a cron job every few minutes to deliver the emails. But that doesn''t work perfectly in Rails 3. What is the best way to deliver emails in production environment in Rails 3? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2006 Nov 03
0
How to upgrade my rails 1.1.6 with pessimistic locking feature?
Hi, How can I upgrade my rails 1.1.6 & activerecord 1.14.4 with the pessimistic locking feature, described in http://wiki.rubyonrails.com/rails/pages/Pessimistic+Locking+Plugin/versions/3? Regards ID --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2010 Jan 21
1
Zpool is a bit Pessimistic at failures
Hello, Anyone else noticed that zpool is kind of negative when reporting back from some error conditions? Like: cannot import ''zpool01'': I/O error Destroy and re-create the pool from a backup source. or even worse: cannot import ''rpool'': pool already exists Destroy and re-create the pool from a backup source. The first one i
2011 Apr 18
2
Problem with resque; parent process doesn't die
I am facing problem in resque process. I have following implementation: /config/resque_schedule.yml add_jobs_to_queue: cron: "15 * * * *" class: FooJob description: "Find results from class Bar and put on queue" /app/jobs/foo_job.rb class FooJob @queue = :normal def self.perform Bar.add_jobs end end app/models/bar.rb class Bar def self.add_jobs
2013 May 28
5
Storing Rails controller callback data in session
http://stackoverflow.com/questions/16770090/storing-rails-controller-callback-data-in-session The idea is: - Perform some time consuming action in background. - Have the results from that action be propagated back to the controller using a callback. - Store the result in an in memory session store. - Have the result in session be used and available from that point onward.
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2012 Sep 18
3
Nginx + Phusion Passenger 3 problem with "504 Gateway time-out"
Hi, I have a Rails 3.2 app. There is a specific request that takes a long time to execute. The context is, the user uploads a pdf, and then we have some processing through carrierwave + rmagick that generate a jpeg from the first page of the document. Everything works in dev mode using both webrick and thin. The problem happens on the prod environment with Nginx + Passenger. The request takes a
2011 Apr 27
1
'bignum too big to convert into long' while migration in rails
While i run rake db:migrate i got below error ,let me know any one . Please it is urgent to me. D:\raj\tweasier>rake db:migrate --trace (in D:/raj/tweasier) DEPRECATION WARNING: Rake tasks in vendor/plugins/open_flash_chart_2/tasks, vend or/plugins/resque/tasks, and vendor/plugins/resque/tasks are deprecated. Use lib /tasks instead. (called from
2010 Jan 10
3
Need advice: threads or Typhoeus?
Hi guys, I need my app to make a few hundreds requests to external web services as quickly as possible. The web services are fairly fast, but still: if I do the requests one after the other, it is too slow. My understanding is I have two options: a- Threads. b- Typhoeus Typhoeus seems great. Yet, the web services are all quite different (some are SOAP, some REST...) and therefore wrapped into
2013 Apr 25
4
Why doesn't SIGTERM quit gracefully?
Hi, I''m wondering why SIGINT and SIGTERM both were chosen for the quick shutdown? I agree with SIGINT but not with SIGTERM. A lot of unix tools send SIGTERM as default (kill, runit among some) and it seems to be the standard way of telling a process to quit gracefully but not among Ruby people (there are a few other ruby processes behaving the same way). I just think it''s weird
2011 Jan 10
2
Problem with multiple requires in Ruby DSL
I''m loving playing around with the DSL. There are some problems (ie 5237), but now that it''s Ruby, I can fix them! woo! However, I''m stumped on this one, which may or may not be related to the DSL. When trying to have a resource have a simple dependency on two things at once, it simply fails, and I''m stumped as to why. The error message is: Parameter