Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sidekiq_strategies

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidekiq_strategies

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sidekiq Worker Strategies

Description

This project contains various types of strategies that handle communication between the accounts-cc and worker-cc.

Polling strategy

This strategy is a simple algorithm that basically follow these simple steps:

  1. Load account and transaction information.
  2. Establish connection with request and reply tubes.
  3. Validate if the account is in a valid state.
  4. Validate if there are available watchers (workers ready to process the job).
  5. Validate if the provider is available (pending implementation).
  6. Search for data in reply tube in case that previously a worker has processed the job.
  7. Search for an existing request job in buried state and put it back in the ready queue.
  8. Put a new request job if steps 6 and 7 are not meet and start polling on request tube to obatin a reply job.
  9. Process the reply job.

This strategy needs to be included on accounts-cc to see in the real world how it works, the only necessary files are:

  1. lib/account_handler.rb
  2. lib/beanstalk_handler.rb
  3. polling_strategy.rb

NOTES:

  • models.rb and models/* are like mocks used to run this strategy stand-alone.
  • lines commented with double '#' indicates that are lines that should be uncommented in accounts-cc
  • lines that have 'TODO: remove' indicates that are lines that should be commented or deleted on accounts-cc

SPECS

Pending

FAQs

Package last updated on 14 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc