chronofage 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -3
- data/db/migrate/3_rename_stdout_and_stderr_to_output.rb +7 -0
- data/lib/chronofage/job.rb +8 -8
- data/lib/chronofage/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec38bdc8210c1a75dcd17506e1a827e88205565e
|
4
|
+
data.tar.gz: a8a6219f8e69659c2bc0b922edf835123f2f1dd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46cc139a68a38f9517342ab0cc460b8ed6fef7c57d5a22d5b1aec99fe4a3f5d5747b28d523209001455510b5f90f47304783f468ca8025e5a042774c8e209ee5
|
7
|
+
data.tar.gz: 5a95b4129d6104b0083ecd27b318a4b5d6f96c5e5419da78de25dddf0afc467dce37284447a2598fca9b55c90ddb7eb650146f7223b0100e66e08f9a5f22f13f
|
data/Gemfile.lock
CHANGED
data/lib/chronofage/job.rb
CHANGED
@@ -11,10 +11,10 @@ module Chronofage
|
|
11
11
|
|
12
12
|
def perform
|
13
13
|
started!
|
14
|
-
ActiveJob::Base.execute(job_data)
|
15
|
-
completed!
|
16
|
-
rescue
|
17
|
-
failed!
|
14
|
+
output = ActiveJob::Base.execute(job_data)
|
15
|
+
completed!(output)
|
16
|
+
rescue Exception => error
|
17
|
+
failed!("#{error.message}\n#{error.backtrace.join("\n")}")
|
18
18
|
raise
|
19
19
|
end
|
20
20
|
|
@@ -22,12 +22,12 @@ module Chronofage
|
|
22
22
|
update!(started_at: Time.now, host: Chronofage::Job.host)
|
23
23
|
end
|
24
24
|
|
25
|
-
def completed!
|
26
|
-
update!(completed_at: Time.now)
|
25
|
+
def completed!(output)
|
26
|
+
update!(completed_at: Time.now, output: output)
|
27
27
|
end
|
28
28
|
|
29
|
-
def failed!
|
30
|
-
update!(failed_at: Time.now)
|
29
|
+
def failed!(output)
|
30
|
+
update!(failed_at: Time.now, output: output)
|
31
31
|
end
|
32
32
|
|
33
33
|
def ready?
|
data/lib/chronofage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chronofage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Goya
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Cron based job scheduler
|
15
15
|
email:
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- chronofage.gemspec
|
27
27
|
- db/migrate/1_create_job_table.rb
|
28
28
|
- db/migrate/2_add_default_priority.rb
|
29
|
+
- db/migrate/3_rename_stdout_and_stderr_to_output.rb
|
29
30
|
- lib/active_job/queue_adapters/chronofage_adapter.rb
|
30
31
|
- lib/chronofage.rb
|
31
32
|
- lib/chronofage/engine.rb
|