./devel/ruby-activejob70, Job classes that can be run by a variety of queueing backends

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 7.0.1, Package name: ruby27-activejob70-7.0.1, Maintainer: pkgsrc-users

Active Job - Make work happen later

Active Job is a framework for declaring jobs and making them run on a
variety of queuing backends. These jobs can be everything from regularly
scheduled clean-ups, to billing charges, to mailings -- anything that can be
chopped up into small units of work and run in parallel.

It also serves as the backend for Action Mailer's #deliver_later
functionality that makes it easy to turn any mailing into a job for running
later. That's one of the most common jobs in a modern web application:
sending emails outside the request-response cycle, so the user doesn't have
to wait on it.

The main point is to ensure that all Rails apps will have a job
infrastructure in place, even if it's in the form of an "immediate runner".
We can then have framework features and other gems build on top of that,
without having to worry about API differences between Delayed Job and
Resque. Picking your queuing backend becomes more of an operational
concern, then. And you'll be able to switch between them without having to
rewrite your jobs.

This is for Ruby on Rails 7.0.


Master sites:

Filesize: 32 KB

Version history: (Expand)


CVS history: (Expand)


   2022-01-16 15:06:14 by Takahiro Kambe | Files touched by this commit (1) | Package updated
Log message:
devel/ruby-activejob70: update to 7.0.1

7.0.1 (2021-01-06)

* Allow testing discard_on/retry_on ActiveJob::DeserializationError

  Previously in perform_enqueued_jobs, deserialize_arguments_if_needed
  was called before calling perform_now.  When a record no longer
  exists and is serialized using GlobalID this led to raising an
  ActiveJob::DeserializationError before reaching perform_now call.
  This behaviour makes difficult testing the job discard_on/retry_on
  logic.

  Now deserialize_arguments_if_needed call is postponed to when
  perform_now is called.

  Example:

	class UpdateUserJob < ActiveJob::Base
	  discard_on ActiveJob::DeserializationError

	  def perform(user)
	    # ...
	  end
	end

	# In the test
	User.destroy_all
	assert_nothing_raised do
	  perform_enqueued_jobs only: UpdateUserJob
	end

  Jacopo Beschi
   2021-12-19 06:53:19 by Takahiro Kambe | Files touched by this commit (4)
Log message:
devel/ruby-activejob70: add package version 7.0.0

Active Job - Make work happen later

Active Job is a framework for declaring jobs and making them run on a
variety of queuing backends.  These jobs can be everything from regularly
scheduled clean-ups, to billing charges, to mailings -- anything that can be
chopped up into small units of work and run in parallel.

It also serves as the backend for Action Mailer's #deliver_later
functionality that makes it easy to turn any mailing into a job for running
later.  That's one of the most common jobs in a modern web application:
sending emails outside the request-response cycle, so the user doesn't have
to wait on it.

The main point is to ensure that all Rails apps will have a job
infrastructure in place, even if it's in the form of an "immediate runner".
We can then have framework features and other gems build on top of that,
without having to worry about API differences between Delayed Job and
Resque.  Picking your queuing backend becomes more of an operational
concern, then.  And you'll be able to switch between them without having to
rewrite your jobs.

This is for Ruby on Rails 7.0.