activejob 5.1.0.beta1 → 5.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activejob might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f531ce0d6eaf7a50b34ce12d446306d52ee5c1c8
4
- data.tar.gz: 75398a20122581b02e422c07798a7770d0481cdf
3
+ metadata.gz: 67881bc8cb8bcd6a7ad8907b570221f7cc82289d
4
+ data.tar.gz: 4a6fbe737335457cac2790394d823753bcb11c2b
5
5
  SHA512:
6
- metadata.gz: d70263baebf9c8476d0a45fe9e0eef753f35baaa221ebce00662971f46a1cc701fd51d9138194d445891954205ed6cfdf66573a6a107cf216ef7b0eaf2c28e70
7
- data.tar.gz: f62463ae9aebd79e7933002dd9b2d786b74ca2dc28b94322fd3ea440b68c5c0d4ab0a59967a5f46d6932b869f4c62168878e5a9e48e49e7ea637597201276d85
6
+ metadata.gz: 567a405191156ab97e81345fc7e101497a55efd6383fb3582a473f351b7233bbcc2783ba769c7b5430c58cc2cd0a6af8d4e187852c65a5d04fe5a075a36391e5
7
+ data.tar.gz: 9a64d5b9212081f731464b3f9c95e1d7f05f9d66ae3f3b9c5fa23754ad3dd293d4c9c376ebcb05bd6593a476173db6091d794325be59e49e1ccd29be00ddf187
@@ -1,3 +1,8 @@
1
+ ## Rails 5.1.0.rc1 (March 20, 2017) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 5.1.0.beta1 (February 23, 2017) ##
2
7
 
3
8
  * Correctly set test adapter when configure the queue adapter on a per job.
@@ -6,10 +11,6 @@
6
11
 
7
12
  *Yuji Yaginuma*
8
13
 
9
- * Push skipped jobs to `enqueued_jobs` when using `perform_enqueued_jobs` with a `only` filter in tests
10
-
11
- *Alexander Pauly*
12
-
13
14
  * Removed deprecated support to passing the adapter class to `.queue_adapter`.
14
15
 
15
16
  *Rafael Mendonça França*
@@ -8,7 +8,7 @@ module ActiveJob
8
8
  MAJOR = 5
9
9
  MINOR = 1
10
10
  TINY = 0
11
- PRE = "beta1"
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -69,14 +69,14 @@ module ActiveJob
69
69
  def perform_start(event)
70
70
  info do
71
71
  job = event.payload[:job]
72
- "Performing #{job.class.name} from #{queue_name(event)}" + args_info(job)
72
+ "Performing #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)}" + args_info(job)
73
73
  end
74
74
  end
75
75
 
76
76
  def perform(event)
77
77
  info do
78
78
  job = event.payload[:job]
79
- "Performed #{job.class.name} from #{queue_name(event)} in #{event.duration.round(2)}ms"
79
+ "Performed #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms"
80
80
  end
81
81
  end
82
82
 
@@ -24,27 +24,30 @@ module ActiveJob
24
24
  end
25
25
 
26
26
  def enqueue(job) #:nodoc:
27
+ return if filtered?(job)
28
+
27
29
  job_data = job_to_hash(job)
28
30
  enqueue_or_perform(perform_enqueued_jobs, job, job_data)
29
31
  end
30
32
 
31
33
  def enqueue_at(job, timestamp) #:nodoc:
34
+ return if filtered?(job)
35
+
32
36
  job_data = job_to_hash(job, at: timestamp)
33
37
  enqueue_or_perform(perform_enqueued_at_jobs, job, job_data)
34
38
  end
35
39
 
36
40
  private
37
-
38
41
  def job_to_hash(job, extras = {})
39
42
  { job: job.class, args: job.serialize.fetch("arguments"), queue: job.queue_name }.merge!(extras)
40
43
  end
41
44
 
42
45
  def enqueue_or_perform(perform, job, job_data)
43
- if !perform || filtered?(job)
44
- enqueued_jobs << job_data
45
- else
46
+ if perform
46
47
  performed_jobs << job_data
47
48
  Base.execute job.serialize
49
+ else
50
+ enqueued_jobs << job_data
48
51
  end
49
52
  end
50
53
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0.beta1
4
+ version: 5.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.0.beta1
19
+ version: 5.1.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.0.beta1
26
+ version: 5.1.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement