Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Releases: albrow/jobs

Version 0.4.2

31 Dec 19:51
Compare
Choose a tag to compare
Version 0.4.2 Pre-release
Pre-release

This release features no real code changes. All I did was update one of the tests so that it would pass when run on CircleCI. To be more specific, I had to update TestRecurringJob so that it was less fickle. Previously, it would fail whenever you passed the -race flag to go test due to subtle timing differences.

CircleCI is now fully set up and the tests pass 🎉

Full Changelog

  • Fix TestRecurringJob so it is less fickle and will pass with the -race flag.

Version 0.4.1

31 Dec 19:18
Compare
Choose a tag to compare
Version 0.4.1 Pre-release
Pre-release

This release has no real code changes. It simply consists of some changes to the README.

Note that CircleCI is currently failing. I'm working on a quick fix now and will release version 0.4.2 shortly. The tests pass locally. The issue appears to have to do with floating point comparisons on a different OS than I usually work on.

Full Changelog

  • Fix typo in example code in README. (Thanks @cdrage!)
  • Add badges for version and CircleCI tests
  • Fix tests to use tcp instead of a socket for compatibility with CircleCI.

Version 0.4.0

25 Aug 04:37
Compare
Choose a tag to compare
Version 0.4.0 Pre-release
Pre-release

This release incorporates PR #30. Thanks @utrack!

I wanted to prioritize getting #30 into master, so I have not yet implemented everything that was planned for Milestone 0.4.0. As a result, some issues have been pushed back to Milestone 0.5.0.

Full Changelog

  • Implement Pool.SetAfterFunc which allows you to specify a function that should be run after each job is executed, regardless of whether it was successful.

Version 0.3.2

12 Jul 00:58
Compare
Choose a tag to compare
Version 0.3.2 Pre-release
Pre-release

This releases fixes #26 and makes it safe to destroy a job while it is being executed. It also adds additional safety around operations, checking if a job was destroyed and doing nothing if it was. This helps keep the database in a consistent state no matter when a job was destroyed.

Full Changelog

  • Fix #26
  • Always check if a job was destroyed before updating its state.

Version 0.3.1

20 May 04:12
Compare
Choose a tag to compare
Version 0.3.1 Pre-release
Pre-release

This release incorporates PR #22. FindById now returns an ErrorJobNotFound if a job cannot be found with the given id. Previously no error would be returned. Big thanks to @epelc for pointing this out and submitting the PR! This release is 100% backwards compatible.

Full Changelog

Version 0.3.0

15 May 20:14
Compare
Choose a tag to compare
Version 0.3.0 Pre-release
Pre-release

This release adds a few reliability enhancements and bug fixes. There is one small breaking change, which is that NewPool now can return an error.

Jobs is now safe for use in binary executables. Previously, jobs would attempt to read lua scripts from the scripts directory during initialization. However, now there is a generation step that parses the files and generates go code which just contains strings. See #13 for more information.

Recovery from failed or disconnected pools is now a little more efficient. Each pool gets a unique id based on the MAC address of the machine its running on instead of a randomly generated id. What this means is that if a machine running a worker pool fails and restarts, it will automatically clean up after itself by re-queuing any jobs it was working on when it crashed. See #5 for more information.

I've made some updates to the README. In particular, I felt in important to note that jobs follows semantic versioning but offers no promises of backwards compatibility until version 1.0. Please note that we are likely going to break backwards compatibility in a major way when #14 is implemented (likely in version 0.4.0 or 0.5.0). I also added a CONTRIBUTING.md file to welcome contributors by making the instructions more obvious.

Full Changelog

  • Jobs no longer reads from files in the scripts directory and instead loads them in a generated file as strings.
  • Each pool now gets a unique hardware id based on its mac address.
  • Pools more efficiently clean up after themselves in the event of a restart.
  • NewPool now can return an error.
  • Some previously unexpected methods are now exported:

Version 0.2.2

05 May 17:29
Compare
Choose a tag to compare
Version 0.2.2 Pre-release
Pre-release

This release incorporates PR #12 from @wuyongzhi and adds support for multiple paths in your GOPATH. Previously, if you had multiple paths in your GOPATH, jobs would fail to load scripts because it only expected one path.

Full Changelog

  • Add support for multiple paths in GOPATH

Version 0.2.1

05 May 17:32
Compare
Choose a tag to compare
Version 0.2.1 Pre-release
Pre-release

This release adds support for connecting to password protected Redis databases by setting Config.Password. It also adds some new sections to the README and elaborates on portions that were previously ambiguous.

Full Changelog

  • Add support for password protected Redis databases
  • Improve README

Version 0.2.0

15 Apr 21:57
Compare
Choose a tag to compare
Version 0.2.0 Pre-release
Pre-release

This release introduces a new mechanism for reporting job failure. Every HandlerFunc must now return an error (which may be nil). If the error is non-nil, it will be picked up by the worker in the same way that panics are. That is, the error will be logged in the database, and the job will either be retried or marked as permanently failed. The primary reason for this change is that returning errors is more idiomatic in go.

Full Changelog

  • Job HandlerFunc's must now return an error.

Version 0.1.1

25 Feb 21:02
Compare
Choose a tag to compare
Version 0.1.1 Pre-release
Pre-release

This release fixes a bug in the Job.Reschedule method, where the job was not being updated in the time index if its time changed. It is backwards compatible with version 0.1.0.

Full Changelog

  • Update the job's score in the time index correctly in the Job.Reschedule method