kishu 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: e9a72d0115d177b245a1847cd6b3707b8a7b20d552666e8a2e1d005f41aada1d
4
- data.tar.gz: 868fb97bbedb22d01d46bd11559268d102d09eaf01c897e686f84b87084fea18
3
+ metadata.gz: ee0cd8a5390a410bf9474041212814b89a4a6e37a8a367ce7ad25eb8da685818
4
+ data.tar.gz: f8c0b9a014d858d3b12961d6832e7261f20b2b6bc966089a9ead285686c2ec77
5
5
  SHA512:
6
- metadata.gz: d11de678ce4948956207bf7fe8e481ab90f5d69b1098c8faa9de7fb0988672c2f2c942dd38a2497e7f85c9d90ca9e81c5747c2e8a077935b34b07281f7656be3
7
- data.tar.gz: 8eeaf42007bea19d16990c0c8551ab361a84ed61e6349a37f2b958a6d1c046f84d0cbec26737e7924122290b2b892a4b5554440bb7fa3b5a4b9458b2fe071b93
6
+ metadata.gz: 8e525cf5b8a9f0ff66d7c47532572f05c8775af7d7e21900d50879232a31c34b9f7cef3afb789e56cfb66df49e4ae1233874ddb66c1c0ca70bc3f87ad943831d
7
+ data.tar.gz: 1ff5b3e2d97b8d7304ae2b32f43a6da1b15a872ab6eb79774d5638ea148fcc6cc01fb8e530790157c1859c41446c254e3f9f9f670b76e6d16c57f518c0e3dbe7
@@ -29,5 +29,10 @@ module Kishu
29
29
  merge_files
30
30
  sort_files
31
31
  end
32
+
33
+ desc "is logstahs running", "check logstahs is working"
34
+ def pipeline_status
35
+ puts Pipeline.new.status?
36
+ end
32
37
  end
33
38
  end
@@ -1,5 +1,6 @@
1
1
  require 'faraday'
2
2
  require 'logger'
3
+ require 'json'
3
4
 
4
5
  require_relative 'utils'
5
6
  require_relative 'base'
@@ -17,11 +18,20 @@ module Kishu
17
18
  main = @conn.get do |req|
18
19
  req.url '/_node/stats/pipelines/main'
19
20
  end
20
- return nil unless main.dig("pipelines","main","events","out") == 0
21
+ response = JSON.parse(main.body)
22
+ return nil unless response.dig("pipelines","main","events","out") == 0
21
23
  end
22
24
 
23
- def is_running?
24
-
25
+ def status?
26
+ main = @conn.get do |req|
27
+ req.url '/_node/stats/pipelines/main'
28
+ req.options.timeout = 200
29
+ end
30
+ response = JSON.parse(main.body)
31
+ puts "Pipeline Status"
32
+ puts response.dig("pipelines","main","events")
33
+ puts response.dig("pipelines","main","events","in")
34
+ puts response.dig("pipelines","main","events","out")
25
35
  end
26
36
 
27
37
  end
@@ -1,3 +1,3 @@
1
1
  module Kishu
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kishu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristian Garza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-19 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -386,8 +386,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
386
  - !ruby/object:Gem::Version
387
387
  version: '0'
388
388
  requirements: []
389
- rubygems_version: 3.0.0
389
+ rubyforge_project:
390
+ rubygems_version: 2.7.6
390
391
  signing_key:
391
392
  specification_version: 4
392
393
  summary: Client for DOI Resolution Logs processing pipeline
393
- test_files: []
394
+ test_files:
395
+ - spec/factories/default.rb
396
+ - spec/fixtures/vcr_cassettes/Kishu_Sushi/wrap_event/when_doi_doesn_t_exist/should_fail.yml
397
+ - spec/kishu_spec.rb
398
+ - spec/report_spec.rb
399
+ - spec/resolution_event_spec.rb
400
+ - spec/spec_helper.rb