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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18c92206f64f9d01f3f00def00f4683b4bef6ed5
4
- data.tar.gz: 25c04b48128788c746dce2e654cc516e4a707c97
3
+ metadata.gz: ec38bdc8210c1a75dcd17506e1a827e88205565e
4
+ data.tar.gz: a8a6219f8e69659c2bc0b922edf835123f2f1dd1
5
5
  SHA512:
6
- metadata.gz: eca7229c60618d760bc27391439003d93bc85be1928afef60dd3f42e373198f1a192094bb0f2bc820df0d0aaca1c21fcc36921906c90e2451d831589fcdc0a18
7
- data.tar.gz: 3436a72eacc3d26171dc976a80f290496ae9951a4651c40588865af1d8072ebb2904821da2b6726370ab70129863b06c185387cb8885bc09b3fc98c3f0ed0283
6
+ metadata.gz: 46cc139a68a38f9517342ab0cc460b8ed6fef7c57d5a22d5b1aec99fe4a3f5d5747b28d523209001455510b5f90f47304783f468ca8025e5a042774c8e209ee5
7
+ data.tar.gz: 5a95b4129d6104b0083ecd27b318a4b5d6f96c5e5419da78de25dddf0afc467dce37284447a2598fca9b55c90ddb7eb650146f7223b0100e66e08f9a5f22f13f
data/Gemfile.lock CHANGED
@@ -1,18 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chronofage (0.0.1)
4
+ chronofage (0.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- byebug (9.1.0)
10
9
 
11
10
  PLATFORMS
12
11
  ruby
13
12
 
14
13
  DEPENDENCIES
15
- byebug
16
14
  chronofage!
17
15
 
18
16
  BUNDLED WITH
@@ -0,0 +1,7 @@
1
+ class RenameStdoutAndStderrToOutput < ActiveRecord::Migration[5.0]
2
+ def change
3
+ remove_column :chronofage_jobs, :stdout
4
+ remove_column :chronofage_jobs, :stderr
5
+ add_column :chronofage_jobs, :output, :string
6
+ end
7
+ end
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module Chronofage
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.7"
3
3
  end
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.5
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: 2017-11-30 00:00:00.000000000 Z
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