Skip to content

Queue is being ignored with delayed job #24

@rsov

Description

@rsov

It seems like the queue param is being ignored by the delayed job

web.xml:

<context-param>
    <param-name>jruby.worker</param-name>
    <param-value>delayed_job</param-value>
</context-param>
<context-param>
    <param-name>jruby.min.runtimes</param-name>
    <param-value>1</param-value>
</context-param>
<context-param>
    <param-name>jruby.max.runtimes</param-name>
    <param-value>1</param-value>
</context-param>
<context-param>
    <param-name>QUEUES</param-name>
    <param-value>dj_queue</param-value>
</context-param>

<listener>
    <listener-class>org.kares.jruby.rack.WorkerContextListener</listener-class>
</listener>

Yet jobs from dj_queue_2 would still be picked up

Output of JRuby::Rack::Worker::ENV shows the queue is set

delayed_job (4.1.5)
    activesupport (>= 3.0, < 5.3)
delayed_job_active_record (4.1.3)
    activerecord (>= 3.0, < 5.3)
    delayed_job (>= 3.0, < 5)

Rails 4.2.10
Tomcat 8.5.28.0

Everything else works as expected

Upon further investigation:
Printing queues inside JRubyWorker returns empty array

Removing :queues from THREAD_LOCAL_ACCESSORS seems to resolve the issue. Although this does not seem like a valid solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions