similar to: How to move create method into worker(sidekiq)?

Displaying 20 results from an estimated 100 matches similar to: "How to move create method into worker(sidekiq)?"

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 Jun 03
1
sidekiq: push background results to front
Rails 3.2.11 Sidekiq latest My app continues background jobs that generate texts as the output. class ProcessText include Sidekiq::Worker def perform(name, count) puts "executing..." @feed = Feed.first @feed.process # here it returns String results! end end What I want is basically how to send (or push?) the result texts to a particular web
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
2018 Mar 05
1
Error joining Samba 4.7.4 DC to existing Win2008R2 domain
Il 05/03/2018 09:55, denis.shigapov via samba ha scritto: > Hi, run please to Windows DC command > dcdiag Already did it, both plain dcdiag and dcdiag /test:DNS. Nothing interesting in the output except for a warning at the end of /test:dns execution (Warning: Failed to delete the test record dcdiag-test-record in zone SAMDOM.LOCAL): ================= PS C:\Users\Administrator.SAMDOM>
2010 Oct 25
0
Rails 3 -NoMethodError (undefined method `original_filename
Hello! I''m using Rails 3, Uploadify, to send images to S3. Right now all the images being uploaded to S3 have the MIME: application/octet-stream I''d like to fix that but I''m getting the following error: NoMethodError (undefined method `original_filename'' for #<ActiveSupport::HashWithIndifferentAccess:0x107c81998>): app/models/photo.rb:29:in
2009 Nov 08
2
send_data with jpeg not working
I''m a newbie having trouble using send_data to send a jpeg file to the browser for display in an html img tag. This is the relevant code from my controller (photos_controller.rb): def retrieve @photo = Photo.find(params[:id]) send_data File.read(@photo.abs_img_path), :type => "image/ jpeg", :disposition => "inline" end def download @photo =
2008 Sep 18
2
Setting up Fleximage
Hello! I''ve been trying today to setup fleximage to handle photo uploads to a RoR application by following the tutorial that is provided (http://github.com/Squeegy/fleximage/wikis/gettingstarted) Originally, I just dropped in all of the sample code that they provided, which I copied below this question. - When I tried to access "new" to upload a new photo, I received an error
2013 Jul 16
0
Which object have my association extension method?
My Stackoverflow question: http://stackoverflow.com/questions/17461273/where-does-association-extension-sit-in/17664817?noredirect=1#17664817 I have an association extension method like the following: class Bundle < ActiveRecord::Base has_many :items do def foo end end I was trying to use delayed job/sidekiq delay() method like the following: b.items.delay.foo But I
2013 Jul 18
0
url_helpers in /lib
Hi, I''m trying to generate some static feeds using a script in /lib that I will later call from a sidekiq worker and I need to access the URL helpers from my library, how can I do it? What I tried so far is including Rails.application.routes.url_helpers in my class but it doesn''t seem to work. I''ve also tried to follow this blog post
2008 May 05
2
Deploying to a staging server using Capistrano: how to start up BackgrounDRb?
Hi. I am using BackgrounDRb to process thumbnails and upload to S3 - things are hunky-dory in development (thumbs are generated, these are uploaded to S3, the metadata is saved to trhe DB, and I get a nice status page updated by periodic calls via ask_status), but when I tried to deploy to our staging server and stop/start BackgrounDRb via Capistrano, things blew up - well, not exactly,
2014 Mar 31
0
Rails Engine ActionController::UrlGenerationError on functional tests
Hi, I'm looking for a way to solve an error I get each times I run my functional tests. I have a Rails Engine gem (isolated), I have a JSON action with a route declared. But each times I use the method get in a test I get an ActionController::UrlGenerationError exception. Here an example of code with the problem: # config/routes.rbMyEngine::Engine.routes.draw do resources :cats, only:
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 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep getting the error: Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my spec_helper.rb and test.rb files down to the bare minimum, still getting the error above.
2017 Sep 08
1
Redis db permission issue while running GitLab in Kubernetes with Gluster
Getting this answer back on the list in case anyone else is trying to share storage. Thanks for the docs pointer, Tanner. -John On Thu, Sep 7, 2017 at 6:50 PM, Tanner Bruce <tanner.bruce at farmersedge.ca> wrote: > You can set a security context on your pod to set the guid as needed: > https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ > > > This
2005 Dec 02
0
RE: How to test for controller
There is a reason the controller is called *controller*. The controller should be making this type of decision. I would do it this way: Class FooController < ApplicationController def bar @side_nav = :display_admin End def baz @side_nav = :hide_admin EndEnd In the view: <% if @side_nav == :display_admin %> ... <% end %> In your application controller, you can set
2018 Jan 24
1
Split brain directory
Hello, I'm trying to fix an issue with a Directory Split on a gluster 3.10.3. The effect consist of a specific file in this splitted directory to randomly be unavailable on some clients. I have gathered all the informations on this gist: https://gist.githubusercontent.com/lucagervasi/534e0024d349933eef44615fa8a5c374/raw/52ff8dd6a9cc8ba09b7f258aa85743d2854f9acc/splitinfo.txt I discovered the
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
I''m currently new to Rails and Ruby and I''m trying to learn from my mistakes, this time I''m trying to upload 2 files from a form for later processing, however, after I hit the "Submit" button. I keep getting this error: TypeError in UploadFilesController#create app/controllers/upload_files_controller.rb:28:in `new''
2013 Sep 18
2
Accessing model attributes in ActiveSupport::Concern module
I have some models which share the same functionality just on other paths. So I decided to put these methods in a module and set the path in the model. My problem is that I''m not able to access the attribute in my module. my model: class Job < ActiveRecord::Base include ImageModel image_dir = "jobs"end my module: module ImageModel extend ActiveSupport::Concern