Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return job ID from client push #78

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 17, 2024

  1. feat: return job ID from client push

    What did we change?
    
    Have `SidekiqPublisher::Worker.client_push` return a job ID string, which
    matches the sidekiq gem behavior. Currently `.client_push` returns the inserted
    `SidekiqPublisher::Job` ActiveRecord instance.
    
    Why are we doing this?
    
    Having a consistent return value between the native sidekiq gem and the
    sidekiq_publisher gem makes things easier to handle. Otherwise clients have to
    juggle using `#job_id` method (for sidekiq_publisher gem) or the job ID string
    (for sidekiq gem). For example:
    
    ```rb
    job = ExampleJob.perform_async
    logger.info msg: "some example", job_id: job.try(:job_id) || job
    ```
    juliantrueflynn committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    3e28611 View commit details
    Browse the repository at this point in the history