Skip to content

Bug: Cannot configure custom polling_strategy from YAML config #925

@mensfeld

Description

@mensfeld

Summary

Custom polling strategies cannot be specified in YAML configuration files.

Steps to Reproduce

# shoryuken.yml
polling_strategy: MyCustomPolling
queues:
  - my_queue
ArgumentError: MyCustomPolling is not a valid polling_strategy

Root Cause

The polling_strategy option only accepts class constants, not strings. YAML files provide strings.

Proposed Fix

Add string handling in Options#polling_strategy:

when String
  Object.const_get(strategy)

Additional Bug

The add_group method also lacks a polling_strategy option.

Original Issue

Originally reported in #675, labeled as bug, closed by stale bot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions