Skip to content

Conversation

toydestroyer
Copy link
Contributor

👋

We've noticed inconsistent behavior between jobs enqueued normally and those enqueued in batches using ActiveJob.perform_all_later. When using batch enqueue, the job attribute scheduled_at is missing (unless wait or wait_until is used).

Besides being inconsistent, this causes a problem with Mission Control, as you can't view the details of a finished job due to this line: https://github.com/rails/mission_control-jobs/blob/7ac38357e33778099b8b76b5476bf36ad3b53bf2/lib/active_job/job_proxy.rb#L30, which throws the following exception:

can't convert NilClass into an exact number (TypeError)

      minus_without_duration(other)

This PR makes the behavior consistent and adds tests.

@toydestroyer toydestroyer marked this pull request as ready for review September 8, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant