Displaying 20 results from an estimated 3000 matches similar to: "Shared Queue / Exclusive Query Results"
2006 Feb 14
25
Rails and background tasks/threads
I am just getting into web servers/web applications and rails as well
so bear with me. I am trying to write a web app that, based on a
users input from the browser, will perform some task, and update the
browser (ala ajax style) as needed and/or provide a way for the user to
control the background task.
Now, I have more experience with java servlets, which makes this easy
enough for a beginner.
2006 Jun 26
2
Serialising multiple accesses to external web service
Hi all,
I have an external web service that I need to log into at a specific
part of my web app,. The problem is that I only have one login to
this web service, and if another login attempt is made while an
existing login session is still active, the existing session gets
terminated.
How can I best serialise access across my mongrel cluster to this
external API?
I thought of creating
2006 Jul 13
4
Update
Folks-
I just commited another revision of the plugin. Nothing huge in this
update but some extra features. Acl lists are now configurable in the
config file. So you will want to blow away and recreate your config
file again. Thanks to Georg Friedrich for this.
And I applied Gunter Ladwig''s patch for singleton worker classes.
These are workers that only have one instance of
2008 Mar 13
6
What is SpecServer?
I have looked through the docs, looked at the code, even gave a
cursory (2 page) glance at google, and it is not clear to me what
SpecServer is or what it is for.
Is it meant to speed up the execution of specs in a rails environment
by doing some magic on the database?
Or I am thinking it keeps a copy of Rails running to avoid the rails
reload delay...
Is there any documentation on this so I
2006 Jul 24
1
Worker-be-gone
Hello,
Thank you so very much for Backgroundrb. Good Stuff.
A general question:
Do:
- calling ''teminate'' within a worker
- calling delete_worker through MiddleMan
- letting the :ttl expire
- calling MiddleMan.gc! (with an appropriate timestamp)
All accomplish the same thing?
And here''s a bonus feature request: It''d be cool if you could specify
how many
2006 Jul 17
2
Very strange after_save problem. Please help.
I have a very strange problem here. I do not get this. So any help is
greatly appreciated.
Basically I have a model that calls a method in the background
process in the "after_save" method. Let''s call the model products. So
what happens is this:
1. I create a new product.
2. Everything works and the product is saved with id 13.
3. A method is called in my background
2006 Aug 19
1
Setting the process priority?
Is it possible to make the process priority higher for backgroundrb?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060819/7a2e6d1b/attachment.html
2006 Dec 30
7
Support for processing after the response has been transmitted?
Hi,
Is there any interest in allowing controller methods to do
post-response processing? This would be useful where some
time-consuming statistic or index processing should be done
after the response has been sent so as not to delay a response
that does not depend on that processing.
This could be implemented by allowing the action method to
yield to the process method which in turn yields to a
2007 Jan 22
1
Observed models cause failures with DRBSpec ?
Hi all !
I don''t believe I am the only one using model observers, right ?
Well, here''s a nice one:
$ drbspec spec
.
Finished in 0.125322 seconds
1 specification, 0 failures
$ drbspec spec
F
1)
''A user with an inactive and an active project should be able to
return active projects only'' FAILED
[] should == [#<Spec::Mocks::Mock:0xb75590bc
2008 Jun 13
6
Newbie question on has_many
I have two classes: a Widget and a User. The User has an id that is
referenced in two places on the Widget: owner_id and operator_id.
How should I structure that reference for has_many?
Thanks folks - I appreciate any help on this.
--David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 May 14
4
searching on foreing keys
Hey all,
I''m using a simple search function. It''s working
great except for foreign keys.
I have one table pets (id,name,owner_id)
and another table people(id,name)
owner_id being a foreign key of pet pointing to people name.
here it is on the pet controller:
@paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id
like
2006 Sep 22
1
how about the global data when multiple backgroundrbs ?
Ezra,
Suppose a chatroom application, a RailsApp + 2 backgroundrbs: MiddleMan1&
MiddleMan2, running in 2 machines.
When Chater1 login, RailsApp call MiddleMan1 to get something about
Chater1 from db to memory, like his contacts or other personal settings.
When Chater2 login, RailsApp call MiddleMan2 do the same thing.
But who is reponsible for the Global Data? like a Online Chaters
2008 Jul 08
4
Conditional "link_to" helper function - AYUDAME POR FAVOR
Hello,
I need to write a function that will return a link only if the current
user is the owner. Here is my code...
1. application_helper.rb
2.
3. def link_to_if_owned(owner_id, anchor_text, where_to_go)
4. if current_user.id == owner_id # current user is owner
5. "#{link_to anchor_text, where_to_go}"
6. else
7. anchor
8. end
9. end
And
2007 Dec 28
9
lost connection 2.0
I lost my "connection lost" error.. but now I''ve got a "Mysql::Error:
MySQL server has gone away" error..
It comes from:
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/connection_adapters/abstract_adapter.rb:128:in ''log''.
I''m not sure if Rails / BackgroundRb uses it .. but i''ve got the mysql
(2.7) gem
2006 Nov 09
2
Multiple backgroundrb servers?
What are people are doing when they need to deploy a new code base? You
can''t just restart backgroundrb, because then you lose any long-running
backgroundrb processes. But then you''d conceivably have to wait several
hours for all your procs to complete before pushing out the new code base.
I was originally thinking that during code deploys, we''d start up a second
2007 Feb 25
1
Relationships question (?)
Hello there,
Im currently taking a Senior Design Course at my college. We are
developing an online document editor prototype with Rails.
I am not well-versed in Rails. As a matter of fact, we chose it for the
project in order to learn it.
The problem we have is the following:
We have a User model (id, username, password, email) and we have a
Document model (id, name, content, owner_id). A
2010 May 14
4
Tricky model situatione
I have two models Club and users. users are regular authenticated
users and some of them might create a club. A club can also have
members (essentially users) and there are attributes and models that
apply to member but not to users.
Here is what I have right now.
Club => belongs_to :user
User => has_many clubs (since a user can host multiple clubs).
Now how do I fit this member model
2006 Mar 20
22
Applicationwide BusinessObject/Hash
Hello,
I''m a total newbie, so please forgive my ignorance.
I am trying to port an application from java to ruby. In order to do that, I
need to put the object containing all the business logic into something like
application scope.
The nicest solution would be just to have an application wide hash, where I can
put all kinds in of objects.
Where and how would I instantiate such an
2010 Jun 30
0
drb problem? ringy-dingy won't answer...
The following code works fine as long as I don''t try to run it through
the distributed server. It doesn''t get there...
It runs fine out of delayed_job, runs fine if called directly.
But if ''distrib'' is true (the default) it runs right up to the call to
the server and right past it without getting to the server or raising
any errors.
Am using Ruby 1.8.6.26 ,
2005 Mar 08
1
Adding to model (newbie)
Sorry if this is a really lame question, I''m sure it''s something fairly
obvious, but I just can''t see it at the moment...
I''m trying to add something simple to the model for a project
management/todo list/thing. The DB has ''first_name'' and ''last_name'',
and I''d like to have "full_name" available.
So -