1. 17 8月, 2019 1 次提交
  2. 26 7月, 2019 1 次提交
  3. 23 7月, 2019 1 次提交
  4. 25 4月, 2019 1 次提交
  5. 23 4月, 2019 1 次提交
    • J
      Use ActiveJob 5.2 retry logic for old jobs · 5d9359bb
      John Hawthorn 提交于
      Rails 6 introduces retries per-exception, instead of a global count of
      retries. Because ActiveJob 5.2 doesn't serialize the execution count
      per-exception, when ActiveJob 6.0 picks up an "old" job it can't know
      the exception count in the new format.
      
      This can also be an issue if AJ 6.0 serializes a new job with
      exception_executions which is later picked up by AJ 5.2, which would
      clear exception_executions (since it has no knowledge of it).
      
      Previously we handled this by resetting exception_executions, if it
      wasn't defined on a job, which could result in the worst case retrying
      the job 2x the times we should.
      
      This commit changes how we handle loading a legacy job: instead of
      resetting exception_executions, we instead will always use the global
      executions count.
      
      This way, jobs which only have one retry_on (and didn't have a behaviour
      change in AJ 6) are backwards-and-forwards-compatible with counts
      respected exactly.
      
      Jobs with multiple retry_on will revert to the AJ5.2 behaviour if they
      were ever run under AJ5.2.
      5d9359bb
  6. 12 4月, 2019 1 次提交
  7. 05 4月, 2019 2 次提交
  8. 04 4月, 2019 1 次提交
  9. 31 3月, 2019 1 次提交
  10. 25 3月, 2019 1 次提交
  11. 23 3月, 2019 1 次提交
  12. 11 3月, 2019 1 次提交
    • E
      Prep release · 7c87fd56
      eileencodes 提交于
      * Update RAILS_VERSION
      * Bundle
      * rake update_versions
      * rake changelog:header
      7c87fd56
  13. 10 3月, 2019 1 次提交
  14. 09 3月, 2019 2 次提交
  15. 26 2月, 2019 1 次提交
  16. 25 2月, 2019 1 次提交
  17. 14 2月, 2019 1 次提交
    • C
      Adding enque time tracking and logging · 31021c78
      Cory Gwin @gwincr11 提交于
      Motivation:
        - Currently we have 2 seperate monkey patches in place for tracking
        enqueded time for 2 seperate workers. It seems that activejob could be
        a source of truth for how long an item has been enqued so that we can
        easily use it for consistent monitoring across workers/apps to ensure
        that jobs are running at an acceptable speed.
      
      Changes:
        - Add an enqueded at attribute and serilization tooling.
        - Add a method to get how long a job has been enqueded for.
        - Add a logging item to show how long a job was enqued prior to the
        perform method firing.
      31021c78
  18. 12 2月, 2019 1 次提交
  19. 05 2月, 2019 1 次提交
  20. 29 1月, 2019 1 次提交
  21. 19 1月, 2019 1 次提交
  22. 09 1月, 2019 2 次提交
  23. 08 1月, 2019 2 次提交
    • R
      Ensure 0 is always the default for the individual exception counters in ActiveJob · acbbd4ab
      Rosa Gutierrez 提交于
      Some adapters like Resque that use Redis, convert the Ruby hash with a
      default value, Hash.new(0), into a regular hash without a default value
      after serializing, storing and deserializing. This raises an error when
      we try to access a missing exception key. A simple solution is not to
      rely on the hash's default value, and provide a default as alternative
      when accessing it instead.
      acbbd4ab
    • R
      Rewrite ActiveJob exception tests so it runs with the real adapters · 154057b4
      Rosa Gutierrez 提交于
      Previously, by extending ActiveJob::TestCase, the test adapter provided
      for tests was being used always, in all executions where supposedly
      different adapters were being used. As a consequence, some bugs visible
      only for some adapters might have gone undetected. This commit changes
      that, skipping queue adapters for which we can't test scheduling jobs
      with a delay.
      154057b4
  24. 05 1月, 2019 1 次提交
    • R
      Support in-flight jobs stored before individual execution counters for `retry_on` (#34731) · 88349cee
      Rosa Gutierrez 提交于
      Also, make tests and examples for individual execution counters
      clearer, as it wasn't entierly clear what would happen in this case:
      
      ```
      retry_on CustomException, OtherException, attempts: 3
      ```
      
      The job would be retried at most 3 times in total, for both
      CustomException and OtherException. To have the job retry 3 times at
      most for each exception individually, the following retry_on
      declarations are necessary:
      
      ```
      retry_on CustomException, attempts: 3
      retry_on OtherException, attempts: 3
      ```
      88349cee
  25. 31 12月, 2018 1 次提交
  26. 21 12月, 2018 1 次提交
  27. 20 12月, 2018 2 次提交
  28. 08 12月, 2018 1 次提交
  29. 06 12月, 2018 1 次提交
  30. 28 11月, 2018 1 次提交
  31. 24 11月, 2018 1 次提交
    • A
      Keep executions for each specific exception (#34352) · 95d9c3b3
      Alberto Almagro 提交于
      * Keep executions for each specific declaration
      
      Fixes #34337
      
      ActiveJob used the global executions counter to control the number of
      times a job should be retried. The problem with this approach was that
      in case a job raised different exceptions during its executions they
      weren't retried the number of times defined by their `attemps` number.
      
      **Example:**
      
      Having the following job:
      ```ruby
      class BuggyJob < ActiveJob::Base
        retry_on CustomException, attemps: 3
        retry_on OtherException, attempts: 3
      end
      ```
      If the job raised `CustomException` in the first two executions and then
      it raised `OtherException`, the job wasn't retried anymore because the
      global executions counter was already indicating 3 attempts.
      
      With this patch each `retry_on` declaration has its specific counter so
      that the first two executions that raise `CustomException` don't affect
      the retries count that future exceptions may have.
      
      * Revert "clarifies documentation around the attempts arugment to retry_on"
      
      This reverts commit 86aa8f8c.
      95d9c3b3
  32. 22 11月, 2018 1 次提交
  33. 20 11月, 2018 1 次提交
  34. 19 11月, 2018 1 次提交
    • J
      Change queueing to queuing in docs and comments [skip ci] · 308d6375
      jacobherrington 提交于
      My spellchecker flagged this as an incorrect spelling, upon further
      research it appears to be a point of contention in English. Either way
      might work.
      
      After further examination queuing is much more common in the Rails
      codebase so making this change will serve to standardize the spelling.
      308d6375
  35. 13 11月, 2018 1 次提交
    • A
      Make `PERMITTED_TYPES` private · 36ea629f
      Alberto Almagro 提交于
      The constant `PERMITTED_TYPES` is only used by the private method
      `serialize_argument` and it already has the `# :nodoc:` annotation as
      the other constants in the class.
      
      Complements e899e228
      36ea629f