Skip to content

Releases: riverqueue/river

v0.11.3

19 Aug 15:00
a3c841b
Compare
Choose a tag to compare

Changed

  • Producer's logs are quieter unless jobs are actively being worked. PR #529.

Fixed

  • River CLI now accepts postgresql:// URL schemes in addition to postgres://. PR #532.

v0.11.2

09 Aug 04:09
9796c45
Compare
Choose a tag to compare

Fixed

  • Derive all internal contexts from user-provided Client context. This includes the job fetch context, notifier unlisten, and completer. PR #514.
  • Lowered the go directives in go.mod to Go 1.21, which River aims to support. A more modern version of Go is specified with the toolchain directive. This should provide more flexibility on the minimum required Go version for programs importing River. PR #522.

v0.11.1

06 Aug 03:37
527de9e
Compare
Choose a tag to compare

Fixed

  • database/sql driver: fix default value of scheduled_at for InsertManyTx when it is not specified in InsertOpts. PR #504.
  • Change ColumnExists query to respect search_path, thereby allowing migrations to be runnable outside of default schema. PR #505.

v0.11.0

03 Aug 02:13
db1eabf
Compare
Choose a tag to compare

Added

  • Expose Driver on Client for additional River Pro integrations. This is not a stable API and should generally not be used by others. PR #497.

v0.10.2

01 Aug 14:11
2c29dfd
Compare
Choose a tag to compare

Fixed

  • Include pending state in JobListParams by default so pending jobs are included in JobList / JobListTx results. PR #477.
  • Quote strings when using Client.JobList functions with the database/sql driver. PR #481.
  • Remove use of filepath for interacting with embedded migration files, fixing the migration CLI for Windows. PR #485.
  • Respect ScheduledAt if set to a non-zero value by JobArgsWithInsertOpts. This allows for job arg definitions to utilize custom logic at the args level for determining when the job should be scheduled. PR #487.

v0.10.1

24 Jul 12:50
b4850c1
Compare
Choose a tag to compare

Fixed

  • Migration version 005 has been altered so that it can run even if the river_migration table isn't present, making it more friendly for projects that aren't using River's internal migration system. PR #465.

v0.10.0

19 Jul 15:04
dfbef6f
Compare
Choose a tag to compare

⚠️ Version 0.10.0 contains a new database migration, version 5. See documentation on running River migrations. If migrating with the CLI, make sure to update it to its latest version:

go install github.com/riverqueue/river/cmd/river@latest
river migrate-up --database-url "$DATABASE_URL"

The migration includes a new index. Users with a very large job table may want to consider raising the index separately using CONCURRENTLY (which must be run outside of a transaction), then run river migrate-up to finalize the process (it will tolerate an index that already exists):

ALTER TABLE river_job
    ADD COLUMN unique_key bytea;

CREATE UNIQUE INDEX CONCURRENTLY river_job_kind_unique_key_idx ON river_job (kind, unique_key) WHERE unique_key IS NOT NULL;
go install github.com/riverqueue/river/cmd/river@latest
river migrate-up --database-url "$DATABASE_URL"

Added

  • Fully functional driver for database/sql for use with packages like Bun and GORM. PR #351.
  • Queues can be added after a client is initialized using client.Queues().Add(queueName string, queueConfig QueueConfig). PR #410.
  • Migration that adds a line column to the river_migration table so that it can support multiple migration lines. PR #435.
  • --line flag added to the River CLI. PR #454.

Changed

  • Tags are now limited to 255 characters in length, and should match the regex \A[\w][\w\-]+[\w]\z (importantly, they can't contain commas). PR #351.
  • Many info logging statements have been demoted to debug level. PR #452.
  • pending is now part of the default set of unique job states. PR #461.

v0.9.0

04 Jul 14:38
7bb1c41
Compare
Choose a tag to compare

Added

  • Config.TestOnly has been added. It disables various features in the River client like staggered maintenance service start that are useful in production, but may be somewhat harmful in tests because they make start/stop slower. PR #414.

Changed

⚠️ Version 0.9.0 has a small breaking change in ErrorHandler. As before, we try never to make breaking changes, but this one was deemed quite important because ErrorHandler was fundamentally lacking important functionality.

  • Breaking change: Add stack trace to ErrorHandler.HandlePanicFunc. Fixing code only requires adding a new trace string argument to HandlePanicFunc. PR #423.

    # before
    HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any) *ErrorHandlerResult
    
    # after
    HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any, trace string) *ErrorHandlerResult

Fixed

  • Pausing or resuming a queue that was already paused or not paused respectively no longer returns rivertype.ErrNotFound. The same goes for pausing or resuming using the all queues string (*) when no queues are in the database (previously that also returned rivertype.ErrNotFound). PR #408.
  • Fix a bug where periodic job constructors were only called once when adding the periodic job rather than being invoked every time the periodic job is scheduled. PR #420.

v0.8.0

26 Jun 03:12
b00c971
Compare
Choose a tag to compare

Added

  • Add transaction variants for queue-related client functions: QueueGetTx, QueueListTx, QueuePauseTx, and QueueResumeTx. PR #402.

Fixed

  • Fix possible Client shutdown panics if the user-provided context is cancelled while jobs are still running. PR #401.

0.7.0

14 Jun 03:37
c1aa4ee
Compare
Choose a tag to compare

Added

  • The default max attempts of 25 can now be customized on a per-client basis using Config.MaxAttempts. This is in addition to the ability to customize at the job type level with JobArgs, or on a per-job basis using InsertOpts. PR #383.
  • Add JobDelete / JobDeleteTx APIs on Client to allow permanently deleting any job that's not currently running. PR #390.

Fixed

  • Fix StopAndCancel to not hang if called in parallel to an ongoing Stop call. PR #376.