fanforce-workers 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzM0OWU4ZTQxNDBkYzA2YjQyNDg5YTUwZWJhNGE5M2RhNmI1OGJmYg==
4
+ ZTc1NWI1N2I0YWE5OTNiMjIwMGJlYjM2MTUyN2RlNGJiMGIwYTY3OA==
5
5
  data.tar.gz: !binary |-
6
- M2I3NjY0Y2IwYmE4ZThhZWVlNGVlYmMzYjgyNTgwNjMwZjdlMTUzYg==
6
+ ZjkxOTgxYjljNGFkZDY3MjhiZmYxM2RiZWJmNTc4Yzc1ODEyMzlhZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWU2MDYxMzc0OWQzZWM0OTNiOTMwZmQ1MWJmZThlNmJmNGU5ZGRmNDAxNzVi
10
- OWFlNTI5OTU2Y2RhNjM4MGYwMTMyMjc2OTczMGIxOWZlM2Q3MzAwZGUxNTJl
11
- ZjFiZTA5NmE3NWU0MWE5ODdhODQzMDY2YjkyMGRiY2E1ZDU1NGY=
9
+ ZjhiZjdiNmYwNzA3YmM3OTUyYjkwOTA5MWRmYmEyMTJhNDc2YWZhYjgxOTQy
10
+ ZjE3N2JmYmFhZDMwMWM3YzY2NWJlNjFhZTkzMmQxMmIyY2RiNzFiOWNiNjgx
11
+ MzQ1ZmJkOWMyNmVmNzM5OTdlNmM4ZjMyNGFlZWQwNmZhNjljODM=
12
12
  data.tar.gz: !binary |-
13
- MTdlZmVhYjE0OTEyNDkyN2VlYjIxOWJlMmZiYTJhMTI3YTBlMjhlNjg5NjFj
14
- OWE1NDg4NGYzMTA3N2E0YzM4MzUyMjI2NjFhZGU4MmY1OTNjMGI5MjA1ZTMw
15
- ODg3YTIwOTQzOTgxNDhjMjlhNzliNDhjMGE0NTM1YmQwOTRjMGU=
13
+ ZTZhZGMxY2QxNzZjNTA2ZDMyOWJkMWU2MmRhN2UwZTU1ZmM5OWNhYWJmMTQx
14
+ YjM0YWFkMGYyNWUyYzc2ZWYzNGM0MmUxYjNiNzM5YWM3MjJkOTc5NzYyYzI2
15
+ NGZiNDRkMTU1MTUwZmEwOTE3MzI5MzhhZGNmYzBmMDY5Nzc1MzI=
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_runtime_dependency 'iron_mq', '~> 4'
20
- gem.add_runtime_dependency 'fanforce-api'
20
+ gem.add_runtime_dependency 'fanforce-api', '~> 0.9'
21
21
  gem.add_runtime_dependency 'typhoeus'
22
22
  end
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class Workers
3
- VERSION = '0.4.6'
3
+ VERSION = '0.4.7'
4
4
  end
5
5
  end
@@ -16,8 +16,8 @@ class Fanforce::Worker
16
16
 
17
17
  def require_dependencies
18
18
  require '.pluginenv'
19
- require 'fanforce/api'
20
19
  require 'iron_mq'
20
+ require 'fanforce/api'
21
21
  end
22
22
 
23
23
  def run_validations
@@ -42,24 +42,24 @@ class Fanforce::Worker
42
42
  puts 'MESSAGE IS NIL'
43
43
  return
44
44
  end
45
-
46
45
  task_data[:last_error] = {
47
46
  exception: e.class.name,
48
47
  message: e.message,
49
48
  backtrace: e.backtrace,
50
49
  raised_at: Time.now
51
50
  }
51
+ task_data[:last_error][:curl_command] = e.curl_command if e.respond_to?(:curl_command)
52
52
  task_data[:env_vars] = @worker_data['env_vars']
53
- print 'ADDING TO ERROR QUEUE: '
54
- puts task_data.to_json
53
+
54
+ puts "ADDING TO ERROR QUEUE: #{task_data.to_json}"
55
55
  Fanforce::Workers.add_error @worker_data['worker_id'], task_data
56
56
  msg.delete
57
57
  puts 'DELETED MESSAGE'
58
58
  end
59
59
 
60
60
  def set_env_vars(vars)
61
- load 'fanforce/api/ff_globals.rb'
62
61
  vars.each {|k,v| ENV[k.to_s]=v }
62
+ load 'fanforce/api/ff_globals.rb'
63
63
  end
64
64
 
65
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-workers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: fanforce-api
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.9'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.9'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: typhoeus
43
43
  requirement: !ruby/object:Gem::Requirement