Displaying 20 results from an estimated 2000 matches similar to: "sidekiq: push background results to front"
2013 Jun 30
1
Sidekiq on Heroku
Hi
I want to use Sidekiq to run some jobs in the background. The jobs will be
created by the whenever gem (or similar) which creates a Sidekiq worker at
a specific time. This worker will in turn create a few hundred Sidekiq jobs.
So, I''m using Heroku and wonder if I need to use a separate worker dyno for
these jobs? Or can I use, for example, Unicorn to run Sidekiq "inside"
2017 Oct 13
2
sidekiq receives SIGHUP when started via ssh -t
Hi,
I have a couple of ideas how to fix it, but I'm trying to figure out
what's going on first. I mainly start this program (sidekiq) on Debian
systems, and it might be my first time running it under CentOS, so my
conjecture is that it has to do with differences between
distributions...
Now then, when I run it this way:
ssh user at example.com '. ~/.bash_profile && rvm 2.3.1
2013 Jul 09
0
How to move create method into worker(sidekiq)?
how to move create method into worker(sidekiq)?
photos_controller.rb
def create
@project = Project.find(params[:project_id])
@photo = @project.photos.build(params[:photo])
@photo.user = current_user
if @photo.save
redirect_to image_upload_project_path(@project)
endend
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2013 Apr 27
4
required field for one, optional for another
rails 3.2.11
My app has User model, its one of the fields is entrepreneur:boolean.
So users have two types; one is normal users, the other is professional
users.
For normal users, only emails and usernames are required and other
fields are optional.
For professional users, in addition to above, addresses and real names
are required.
Is there any Ruby way to set the requirement depending on the
2017 Oct 16
0
sidekiq receives SIGHUP when started via ssh -t
Hi,
I was able to narrow it down to this ruby script:
#!/usr/bin/env ruby
Process.daemon
while true
sleep 1
end
And I can reproduce it on one particular CentOS server, on the other
CentOS server it works as on Ubuntu. The CentOS server where I can
reproduce the issue is supposed to have vanilla CentOS, but probably
not exactly.
So, when I run it this way on CentOS 7:
ssh user at
2013 May 25
1
Silent Failure when starting Unicorn on Heroku
Switched my RoR (3.1.3, 1.9.2) app from Thin to Unicorn (4.6.2). It ran
fine in development
(Mac OSX), but when deploying to production on Heroku, it fails silently
(no backtrace, no error detail). Log looks like:
Starting process with command `bundle exec unicorn start -p 6069 -c
./config/unicorn.rb`
/app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:634:in
2012 Feb 24
3
Devise generates Mailer by its own?
Rails 3.1.3
Hi. I''m a little confused with Devise and ActionMailer.
It seems that Devise has its own way of sending mails through
ActionMailer.
Does it generate Mailer class when "rails g devise..." command is
executed?
Or do I need to do some special command in order to generate Mailer?
I have certainly set up a devise User table but there is no Mailer class
for it,
2004 Jul 09
3
Can R read data from stdin?
Is there anyway I can write a script which feed input datasource from stdin
and let R process it (maybe frequency report) then output the report to
stdout?
I can't seem to find much info on documentation or FAQ on this topic.
Thanks!
Soichi Hayashi
**********************************************************************
The information contained in this communication is
confidential,
2012 Oct 13
4
Database design, working but looking for better ways
Rails 3.1.3
Hi. I have designed the database used for my travel plan application.
You should be able to look at the diagram in the link below, hopefully.
https://cacoo.com/diagrams/biDSyxh8yzk2kIeg
("belongs_to" is omitted since it''s obvious)
Basically, the application can list the destinations from a choice of
the departure.
Not mention that the departure_id (integer) and
2012 Nov 12
7
RSpec: controller POST create
Rails 3.1.3
rspec-rails (2.11.4)
rspec 2.11.1
I am new to rspec. I don''t quite understand tests for POST create part.
I have generated scaffold, and simultaneously it generated
controller_spec.rb as well.
it "assigns a newly created plan as @plan" do
post :create, {:plan => valid_attributes}, valid_session
assigns(:plan).should be_a(Plan)
2013 Jan 07
2
plot x-axis DateTime NOT evenly spaced
R-64 latest
Hi. I am trying to plot a set of csv data, which looks like
> head(interval)
date inteval
1 2012-07-01 00:57:54 +0900 156
2 2012-07-01 01:07:41 +0900 587
3 2012-07-01 01:09:31 +0900 110
4 2012-07-01 01:18:42 +0900 551
5 2012-07-01 01:39:01 +0900 1219
6 2012-07-01 01:40:40 +0900 99
as you can see, more than one event happens each day,
2013 Mar 11
3
take two columns from a set of lists
say I have a matrix and lists like
x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2)
x.list <- lapply(seq_len(nrow(x)), function(i) x[i,])
if I want a column of the matrix x, I write
x[, 2]
for example.
But how can I do something similar for a set of lists, x.list, above?
> x.list
[[1]]
[1] 12.1 0.1 12.0 1.1
[[2]]
[1] 3.44 3.00 33.10 23.00
unlist(x.list)[,2] does
2004 Jul 21
3
Can R work on very large of data?
Hello..
I am pretty new for R, but if I understand it correctly, when R read data by
doing something like "d <- read.table("/dev/stdin")", it read entire data
first then start processing..
Is there anyway I can tweak R around so that it will start processing as
data comes and not load everthing on memory at once? The reason for this is
because we have a case where
2012 Nov 30
4
Tokeninput incremental search not working
Rails 3.1.3
After watching
http://railscasts.com/episodes/258-token-fields?autoplay=true
I have installed the similar functionality to my app.
However,
def index
@cities = City.all
...
does in fact give the list of all cities in the text field, but
def index
@cities = City.where("name like ?", "%#{params[:q]}%")
...
does NOT
2013 Mar 18
4
plotting CIE chromaticity diagram?
Has anyone plotted or is it possible to plot
CIE *xy* chromaticity diagram
http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg
I need this plot in color.
ishida
[[alternative HTML version deleted]]
2012 Feb 22
3
Parent id for find_or_create method
Rails 3.1.3
I have tables, Video and Script having association,
Video 1 --- n Script
So, every Script needs the parent id, in this case, video_id.
If I simply create a new Script instance, the view renders as follows.
<%= render :partial => "new_script", :locals => { :script =>
Script.new(:video_id => @video.id)} %>
which works fine. Now I would like to
2012 Aug 25
2
cannot bundle install due to missing therubyracer
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
rails 3.1.3
Ubuntu 10.04 LTS
I have another environment with MacOSX Snow Leopard, and am sharing the
Rails project files through Dropbox.
When I chose to develop a project further in this Ubuntu machine, I have
executed ''bundle install'' which gave an error
#---------
Gem::Installer::ExtensionBuildError: ERROR: Failed to
2017 Sep 07
1
Redis db permission issue while running GitLab in Kubernetes with Gluster
Hello,
I am trying to setup GitLab, Redis and PostgreSQL containers in Kubernetes
using Gluster for persistence. GlusterFS nodes are setup on machines
(CentOS) external to Kubernetes cluster (running on RancherOS host). Issue
is that when GitLab tries starting up, the login page doesn't load. It's a
fresh setup and not something that stopped working now.
root at
2013 Mar 10
2
list + lapply insead of matrix + apply
I need to develop a simple list manipulation. Although it seems easier to
do it in matrix form, but I need it in list form.
I have a matrix
x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2)
for list form example, the conversion is
x.list <- lapply(seq_len(nrow(x)), function(i) x[i,])
### list version
calcnorm=function(a, b){
diff <- mapply("-", a, b)
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