oban v0.6.0 Release Notes

Release Date: 2019-07-26 // almost 5 years ago
  • โž• Added

    • ๐ŸŒฒ [Oban.Query] Added :verbose option to control general query logging. This allows debug query activity within Oban to be silenced during testing and development.

    • โœ… [Oban.Testing] Added all_enqueued/1 helper for testing. The helper returns a list of jobs matching the provided criteria. This makes it possible to test using pattern matching, which is more flexible than a literal match within the database.

    ๐Ÿ”„ Changed

    • [Oban.Config] All passed options are validated. Any unknown options will raise an ArgumentError and halt startup. This prevents misconfiguration through typos and passing unsupported options.

    • ๐Ÿ‘ท [Oban.Worker] The perform/1 function now receives an Oban.Job struct as the sole argument, calling perform/1 again with only the args map if no clause catches the struct. This allows workers to use any attribute of the job to customize behaviour, e.g. the number of attempts or when a job was inserted into the database.

    The implementation is entirely backward compatible, provided workers are defined with the use macro. Workers that implement the Oban.Worker behaviour manually will need to change the signature of perform/1 to accept a job struct.

    • [Oban] Child process names are generated from the top level supervisor's name, i.e. setting the name to "MyOban" on start_link/1 will set the notifier's name to MyOban.Notifier. This improves isolation and allows multiple supervisors to be ran on the same node.

    ๐Ÿ›  Fixed

    • ๐Ÿ”€ [Oban.Producer] Remove duplicate polling timers. As part of a botched merge conflict resolution two timers were started for each producer.