Displaying 20 results from an estimated 28 matches for "job_id".
2006 Aug 24
3
A new QueueWorker class
Hello all,
I''ve come up w/ a worker class that manages queued jobs using a fixed
number of child workers. Well, that''s not quite true -- a new worker is
spawned for each job, but you set the total number that may exist at once.
There are three components:
1) queue_worker.rb: The singleton worker that manages the child workers.
You probably want to auto start this. Make sure you
2008 Jan 03
1
Thread_pool bug?
...ContactsWorker < BackgrounDRb::MetaWorker
set_worker_name :import_contacts_worker
pool_size(1)
def create(args = nil)
# Restart any import jobs that didn''t complete or start
ImportJob.process_all_ready
end
def import_contacts(args = nil)
thread_pool.defer(args) do |job_id|
begin
job = ImportJob.find(job_id)
job.process_job
rescue => err
logger.error "ImportContactsWorker(#{job_id}) failed! #{err.class}:
#{err}"
end
end
end
end
I started one long import job no problem. Then, I started another one, and I
ex...
2007 Aug 22
3
tackle memory insufficiency for large dataset using save() & load()??
Hello List, i have been agonizing over this for days, any reply would be greatly appreciated!
Situation:___________________________________
My original dataset is a .csv dataset (w/ 2M records) with 4 variables:
job_id (Primary key, won't be used for analysis, just used for join tables),
sector_id (categorical variable, for 19 industry sectors),
sqft (con't variable for square footage),
building_type (categorical, for 2 building types)
some values of sqft were inputed wrong, so i'd like to s...
2006 Jul 02
18
JOIN conditions
Hi,
how can I get Rails to generate SQL queries with conditions in the JOIN clause?
What I would want is:
SELECT * FROM people p
LEFT OUTER JOIN jobs j (p.job_id = j.id AND j.salary > 9999999)
I tried
People.find(:all, :include => ''jobs'', :conditions => ''jobs.salary > 9999999'')
but that generates
SELECT * FROM people p
LEFT OUTER JOIN jobs j (p.job_id = j.id)
WHERE j.salary > 9999999
Thanks.
C...
2005 Dec 05
1
Lack of 'LEFT JOIN' in Oracle 8, any patch for theta style (+)
Dears,
Oracle 8 don''t support ANSI syntax with :
SELECT e.emp_id,
e.fname,
e.lname,
j.jobdesc
FROM employe e
LEFT JOIN jobs j ON e.job_id = j.job_id
but only
SELECT e.emp_id,
e.fname,
e.lname,
j.jobdesc
FROM employe e,
jobs j
WHERE j.job_id (+) = e.job_id
JOIN syntax came with 9i.
Anyone patched Rails source for supporting that (+) ''theta'' style ?
I''m using...
2007 Apr 26
1
mapping column names in legacy schemata
...Table _fix has columns:
_job
_ change
_date
_effect
When defining the Ruby class, I''d like to do something like this:
class Fix < ActiveRecord::Base
self.table_name = "_fix"
use_mapping ( # imaginary construct..
:_job => "job_id",
:_change => "change_id" ,
:_date => "date" ,
:_effect => "status")
self.primary_key = "job_id"
end
and want to access it like this:
Fix.find( id ).status = "partial fix"
which should acces the
Is there a w...
2008 Jan 03
1
Memory leak and long process problem
I use backgroundrb for many long tasks in my system, but I''m having issues
with one in particular. Two large tasks for me are importing people and
updating companies.
def import_contacts(args = nil)
thread_pool.defer(args) do |job_id|
begin
job = ImportJob.find(job_id)
job.process_job
rescue => err
logger.error "MscWorker#import_contacts failed! #{err.class}:
#{err}"
end
end
end
def update_company_from_vendor(args = nil)
thread_pool.defer(args) do |company_id|...
2006 Jul 06
4
Oracle HR on Rails
Interesting read...apologies if it has been posted already.
http://www.oracle.com/technology/pub/articles/saternos-rails.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/619e650a/attachment.html
2008 Feb 01
3
Job Queue
After some initial stumblings, I think I''ve got the hang of
backgroundrb. It''s great! I''d been thinking for many many months how
cool something like this would be!
I''m trying to make a "job queue". That is, a pool of worker threads
monitor a queue. When a job appears, one of the workers grabs it and
executes the task. When complete, the worker
2006 Jan 30
5
Action Mailer woes
Hi gang,
Im having my first stab at ActionMailer and not having any luck. Perhaps
someone could help me out.
I generated a a mailer called ItemMailer - its purpose is to take some
information that I''ve already gathered in a ToDo list form and to mail
it out to the person who is nominated for the task
In environment.rb I have;
ActionMailer::Base.server_settings = {
:address =>
2008 Jan 03
0
Strange problem
I use backgroundrb for many long tasks in my system, but I''m having issues
with one in particular. Two large tasks for me are importing people and
updating companies.
def import_contacts(args = nil)
thread_pool.defer(args) do |job_id|
begin
job = ImportJob.find(job_id)
job.process_job
rescue => err
logger.error "MscWorker#import_contacts failed! #{err.class}:
#{err}"
end
end
end
def update_company_from_vendor(args = nil)
thread_pool.defer(args) do |company_id|...
2006 Sep 23
1
Better rails way to join tables?
...,
I''ve figured out how to join tables using :joins, but is there a more
elegant way to do this using built-in rails methods?
Here is the code:
Hiringstep_Job.find(
:all,
:joins => ", hiringsteps",
:conditions => ["hiringstep_jobs.hiringstep_id = hiringsteps.id AND
job_id = ?", 1])
Thanks,
David
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/J...
2007 Apr 26
0
ActiveRecord: mapping column names when using legacy schemata
...Table _fix has columns:
_job
_ change
_date
_effect
When defining the Ruby class, I''d like to do something like this:
class Fix < ActiveRecord::Base
self.table_name = "_fix"
use_mapping ( # imaginary construct..
:_job => "job_id",
:_change => "change_id" ,
:_date => "date" ,
:_effect => "status")
self.primary_key = "job_id" # no more reference to _job column
end
and want to access it like this:
Fix.find( id ).status = "partial fix&qu...
2005 Nov 20
1
mySQL 5.0 upgrade - incompatible DateTime format?
...user_name` = ''steve'', `labels` = NULL, `job_name` = NULL, `domain_controller` = NULL, `domain_id` = NULL, `contact_name` = NULL, `customer_id` = NULL, `logged_at` = ''2005-11-20T15:33:12-0800'', `user_id` = 2, `is_log` = 0, `contact_id` = NULL, `vendor_id` = NULL, `job_id` = NULL, `subject` = ''test'', `customer_name` = NULL WHERE id = 8
what is that strange datetime value, anyway? the
one it''s trying to store looks like this:
''2005-11-20T15:33:12-0800''
the DateTime that Rails generates automatically for updated_at loo...
2008 Dec 22
7
Help creating and using database
I have this problem.
I have a Job table in my db, and each job has many steps (table Step).
Is not possible to know how many steps a job has until it is created. So
when I create a new job I have a problem: I can not have a step_id in my
Job table, because it can be one step or more.
What can I do?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
2005 Dec 12
2
count sql failing with unknown table....
...obs with multiple sectors, see below for DDL.
The query generated by sector.jobs.count seems a bit funny. I''m no
MySQL expert but should there be more references to the join between
jobs and jobs_sectors?
Thanks for you time,
Tim
DDL as promised.....
CREATE TABLE `jobs_sectors` (
`job_id` mediumint(9) NOT NULL default ''0'',
`sector_id` mediumint(9) NOT NULL default ''0''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `jobs` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(254) NOT NULL default '''',
`de...
2005 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
Hi,
I''m running round in circles again! I''m trying to save a note that has a
HABTM relationship with a job. The note is new - the job exists.
In my partial for notes I have ;
<%= start_form_tag :action => ''new_note'', :id => @job %>
<%= text_area_tag "note", nil, :size => "65x10" %>
<%=submit_tag
2006 Jul 27
1
Update second pulldown menu based on first menu selection?
I know I''ve seen this somewhere on this board and just can''t search it
anymore.
I have three relational tables: clients, projects, and tasks. Currently
I''m working on customizing the ''new/edit'' task _form. So far I have it
listing clients in a pulldown menu so I can assign the new task to a
client. I''d like to have a second pulldown select
2012 Jul 23
4
[RFC 0/2] virtio: provide a way for host to monitor critical events in the device
As it was discussed recently, there's currently no way for the guest to notify
the host about panics. Further more, there's no reasonable way to notify the
host of other critical events such as an OOM kill.
This short patch series introduces a new device named virtio-notifier which
does two simple things:
1. Provide a simple interface for the guest to notify the host of critical
2012 Jul 23
4
[RFC 0/2] virtio: provide a way for host to monitor critical events in the device
As it was discussed recently, there's currently no way for the guest to notify
the host about panics. Further more, there's no reasonable way to notify the
host of other critical events such as an OOM kill.
This short patch series introduces a new device named virtio-notifier which
does two simple things:
1. Provide a simple interface for the guest to notify the host of critical