Questions tagged [sneakers]

Used for tagging questions related to the background processing framework for Ruby, based on RabbitMQ.

A high-performance RabbitMQ background processing framework for Ruby.

It uses a hybrid process-thread model where many processes are spawned (like Unicorn) and many threads are used per process (like Puma), so all your cores max out and you have best of both worlds.

For more details, see the Wiki.

25 questions
7
votes
1 answer

Testing RSpec for Sneakers and Rabbitmq

I have been recently developing Message Queue using Rabbitmq and Sneakers Workers. I had a look on this guide https://github.com/jondot/sneakers/wiki/Testing-Your-Worker But I still have no idea about how to develop the tests for them. I'm very…
Will Nguyen
  • 339
  • 1
  • 10
4
votes
2 answers

Rails + Sneakers: could not obtain a connection from the pool

We're using Sneakers gem in production for a big application. And sometimes the load can be so huge that one specific queue may contain over 250_000 messages. And in such cases, the exception ActiveRecord::ConnectionTimeoutError: could not obtain a…
taras
  • 1,239
  • 1
  • 10
  • 16
2
votes
1 answer

Can not connect to Rails database from Sneakers worker (RabbitMQ RPC call)

TLDR; Why Sneakers worker can't connect to the database or can't query it? (General advices on "do's" and "dont's" are also welcome in comments) Full question: I am able to execute RPC call that returns a simple string, but I can't execute RPC call…
ToTenMilan
  • 582
  • 1
  • 9
  • 19
2
votes
0 answers

Sneakers parallel processing

I have two apps App 1 and App 2. Both are Rails App. App 1 collects the data from the user and these collected data need to synced to App 2. I use RabbitMQ and Sneakers (with 5 worker processes) for the syncing process between Apps. Whenever there…
Manikandan
  • 21
  • 2
2
votes
0 answers

How to requeue message in RabbitMQ using Sneakers gem with count

Now I'm publishing two messages in two different queues, the problem that they are dependent on each other, I have to make sure that I got the message from queue no.1 before the message of queue no.2, so I decided to requeue the queue2 message if…
2
votes
2 answers

ActionMailer, Sneakers, deliver_later function

I have next code: # Gemfile gem 'sneakers' # application.rb config.active_job.queue_adapter = :sneakers # application_mailer.rb class ApplicationMailer < ActionMailer::Base ... def send_letter(params={}) mail(params) ... end end #…
Vadim U
  • 21
  • 2
2
votes
1 answer

RabbitMQ/Sneakers - Limit specific queue to only one worker at a time?

I have a use case with RabbitMQ and the Sneakers gem where I have multiple Workers running to respond to several dozen queues in my project. So it's very likely that workers may be processing messages from the same queue at the same time. With one…
Argus9
  • 1,863
  • 4
  • 26
  • 40
1
vote
1 answer

How to run rake sneakers:run

I am trying Rabbitmq and sneakers for the first time. And I am facing some issues when i try to run my workers. I have added the following line in application.rb config.active_job.queue_adapter = :sneakers And when i run rake --tasks, sneakers…
1
vote
1 answer

Object variables in multithreaded Sneaker works like a global mutable data

I have a sneaker worker(given below) as a backend of a chatbot. class RabbitMQWorker include Sneakers::Worker from_queue "message" def work(options) parsed_options = JSON.parse(options) # Initializing some object…
Raounak Sharma
  • 345
  • 1
  • 4
  • 15
0
votes
0 answers

Sneaker Price Comparison model

i would like to build a sneaker price comparison website to let my audience find the best online reseller to buy the sneaker at the specific time when they are comparing for the specific model of sneaker and size they want. in order to do so we need…
0
votes
1 answer

How can I use sneakers (for rabbitMQ) to requeue a message for up to 5 failed attempts?

I see the old gem versions supported the ability to define these sort of things within the Sneakers.configure params back around 2015, but this is no longer the case. So im trying to find alternatives, but the sneakers wiki do not have any details,…
alilland
  • 2,039
  • 1
  • 21
  • 42
0
votes
0 answers

Rails with sneakers: could not obtain a connection from the pool

I have a Rails 6 application with Postgres 9.6 using sneakers to receive some 10-20 messages/second from RabbitMQ. Every now and then I get this error: ERROR: [Exception error="could not obtain a connection from the pool within 5.000 seconds (waited…
Nick M
  • 2,424
  • 5
  • 34
  • 57
0
votes
1 answer

Response code 404 when sendig a GET request to the a Website

I am attempting to make the beginning parts of a shopify sneaker bot so I am using HTTP client and request to send a get request to the website so that I can get to the products/json path. This was working before however, when I send request the…
0
votes
0 answers

Phyton| After Compiling to exe it doesnt start the threads and just restarts

I got this: if question2 == "1": print(Fore.YELLOW + 'Starting....') time.sleep(2) print(Fore.GREEN + 'Started Task [1]!') system("title " + f"Converse Bot V.1.0 User: {user} [Running Task[1]]") p1 =…
0
votes
0 answers

Exception error="uninitialized constant V1" using Sneakers

I'm trying to implement Sneakers, but I'm having some issues. Below you can find the code which subscribers to my queue and the actual error. require 'sneakers' require 'jwt' require 'redis' require 'json' $redis = Redis.new(url: ENV['REDIS_URL'],…
testbuck
  • 21
  • 2
1
2