sidekiq

Catch exception but do retry with Sidekiq

空扰寡人 提交于 2020-05-29 04:17:05
问题 By default sidekiq will retry any jobs that throw an exception. That is fine. However, I want to be able to catch that exception so that my exception handler doesn't get notified, and then retry the job. How do I accomplish this in react? So my code looks like this: def perform ... rescue ExcClass => ex # log end But I want to actually retry that job. 回答1: Configure your error service client to ignore ExcClass. Sidekiq will retry, you don't get error reports. 回答2: If I'm following your

【Linux】【gitlab】gitlab安装、备份、恢复、升级、内存消耗问题

独自空忆成欢 提交于 2020-04-24 03:40:29
前言 GitLab:GitLab 是一个用于仓库管理系统的开源项目,使用 Git 作为代码管理工具,并在此基础上搭建起来的web服务。 功能:Gitlab 是一个提供代码托管、提交审核和问题跟踪的代码管理平台。对于软件工程质量管理非常重要。 版本:GitLab 分为社区版(CE) 和企业版(EE)。 配置:建议CPU2核,内存2G以上。 安装 一、gitlab安装 1、安装gitlab yum库 1.安装最新版gitlab-ee(企业版) curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash 2.安装最新版gilab-ce(社区版) curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash 2、安装gitlab 其中ip为gitlab的访问地址。 1.企业最新版: EXTERNAL_URL="http://ip" yum install -y gitlab-ee 2.社区最新版: EXTERNAL_URL="http://ip" yum install -y gitlab-ce 3.安装指定版本:

How set timeout for jobs in sidekiq

北城以北 提交于 2020-04-10 07:28:06
问题 I encountered an issue with sidekiq: I want to set timeout for jobs, meaning when a job has process time greater than timeout then that job will stop. I have searched how to set global timeout config in file sidekiq.yml. But I want to set separate timeout for difference separate jobs meaning one of classes to define worker will have particular timeout config. Can you help me. Thanks so much. 回答1: There's no approved way to do this. You cannot stop a thread safely while it is executing. You

Ruby on Rails constantly updating a variable

匆匆过客 提交于 2020-03-06 05:53:19
问题 Currently I am building an application that allows users to place bids on products and admins to approve them. The 'transactions' themselves take place outside of the scope of the application. Currently, users see the price of an asset on the transaction/new page and submit a bid by submitting the form. Admins click a button to approve the bid. class TransactionsController < ApplicationController before_action :get_price def new @price = get_price @tansaction = Transaction.new end ### def get

Testing that Devise is re-sending confirmation instructions email in a background worker

核能气质少年 提交于 2020-02-25 01:30:02
问题 I want to send Devise confirmation instructions to users a second time if they haven't confirmed within two days of signing up, however I can't seem to get my success case test to pass. Background worker (runs once a day): class ResendConfirmationWorker include Sidekiq::Worker sidekiq_options queue: :resend_confirmation, retry: false def perform d = Time.zone.now - 2.days users = User.where.not(confirmation_sent_at: nil) .where(confirmed_at: nil) .where(created_at: d.beginning_of_day..d.end

Testing that Devise is re-sending confirmation instructions email in a background worker

房东的猫 提交于 2020-02-25 01:28:27
问题 I want to send Devise confirmation instructions to users a second time if they haven't confirmed within two days of signing up, however I can't seem to get my success case test to pass. Background worker (runs once a day): class ResendConfirmationWorker include Sidekiq::Worker sidekiq_options queue: :resend_confirmation, retry: false def perform d = Time.zone.now - 2.days users = User.where.not(confirmation_sent_at: nil) .where(confirmed_at: nil) .where(created_at: d.beginning_of_day..d.end

CarrierWave Backgrounder process leaves denied access to s3 image

拜拜、爱过 提交于 2020-02-08 09:15:47
问题 My current Sidekiq setup with the following is processing the image, but nothing is being done in the background. The page takes 10 seconds to load and then the new image is shown on the redirected page with the following path. https://d9vwx0ll7rhpx.cloudfront.net/development/photo/image/product_thumb/product_thumb_0046d4ca-ca8d-4c02-b8cd-da0255c5736e.jpg I would like for this process to be done in the background. def create @photo = Photo.new(photo_params) if @photo.save UploadsWorker

CarrierWave Backgrounder process leaves denied access to s3 image

旧时模样 提交于 2020-02-08 09:15:09
问题 My current Sidekiq setup with the following is processing the image, but nothing is being done in the background. The page takes 10 seconds to load and then the new image is shown on the redirected page with the following path. https://d9vwx0ll7rhpx.cloudfront.net/development/photo/image/product_thumb/product_thumb_0046d4ca-ca8d-4c02-b8cd-da0255c5736e.jpg I would like for this process to be done in the background. def create @photo = Photo.new(photo_params) if @photo.save UploadsWorker

CarrierWave Backgrounder process leaves denied access to s3 image

旧城冷巷雨未停 提交于 2020-02-08 09:14:22
问题 My current Sidekiq setup with the following is processing the image, but nothing is being done in the background. The page takes 10 seconds to load and then the new image is shown on the redirected page with the following path. https://d9vwx0ll7rhpx.cloudfront.net/development/photo/image/product_thumb/product_thumb_0046d4ca-ca8d-4c02-b8cd-da0255c5736e.jpg I would like for this process to be done in the background. def create @photo = Photo.new(photo_params) if @photo.save UploadsWorker