pique 0.1.1 → 0.1.3

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: df0100d41903ba4dd0e104a0c8cb36c49e2a1a4620b5acf4fc3f461ff4cfe32e
4
- data.tar.gz: 1da50fecee9798e602f758694aab7d5f8843dd26ad8fe819d1700150bd30e05d
3
+ metadata.gz: 59376966d633971953d649531aa89bc22dcb451fbaa0465ed291ed14882c21a9
4
+ data.tar.gz: b25cbca10beac5fb0c9793b30203d36fc87b6f8403b99424cd67f5b2b2d737e2
5
5
  SHA512:
6
- metadata.gz: 334cefb99a96af10ec9999ec2f71da6691c76a26403a6e0914aefb8608445af446280822074936940b348e33ec0f0b840a9f326ec9fd36906bf2e245dd46be21
7
- data.tar.gz: 9dac4913f9d48f8308aca4ba98f528a43c0e22084418da3c878d1fee74296af74c00318bbbccb1166d5bbf4165dcaa91a6483c39bbf5466ee832bcc92ce1a46c
6
+ metadata.gz: 02d09a5204a09078ea47617f30adbf0ac2149d3cc6bd6fc4b9b4a45a64afa9d49a2d76c322469b4b60f1220f8fa6fb96f7893234ce8a9cca9aead0c3367b95a0
7
+ data.tar.gz: 22533819d086a0f42799e9e17f451e35b17fe81bed9fe65c465bbff916931894a6889c69d7245885f769336320a8527ccd50813fc67f46a14d2fd98ad3f02c68
data/lib/pique/agent.rb CHANGED
@@ -22,8 +22,8 @@ class Pique::Agent
22
22
  logger.info "Pique Agent Started"
23
23
  end
24
24
 
25
- def ready?
26
- ENV['PIQUE_API_URL'].present? && running?
25
+ def can_run?
26
+ ENV['PIQUE_API_URL'].present?
27
27
  end
28
28
 
29
29
  def running?
@@ -5,8 +5,10 @@ class Pique::Sidekiq::ClientMiddleware
5
5
  include Sidekiq::ClientMiddleware
6
6
 
7
7
  def call(worker, job, queue, redis_pool)
8
- agent = Pique::Agent.run!
9
- agent.push(worker, job) if agent.ready?
8
+ if Pique::Agent.can_run?
9
+ agent = Pique::Agent.run!
10
+ agent.push(worker, job)
11
+ end
10
12
  yield
11
13
  end
12
14
  end
@@ -5,8 +5,12 @@ class Pique::Sidekiq::ServerMiddleware
5
5
  include Sidekiq::ServerMiddleware
6
6
 
7
7
  def call(worker, job, queue)
8
- agent = Pique::Agent.run!
9
- yield
10
- agent.push(worker, job) if agent.ready?
8
+ if Pique::Agent.can_run?
9
+ agent = Pique::Agent.run!
10
+ yield
11
+ agent.push(worker, job)
12
+ else
13
+ yield
14
+ end
11
15
  end
12
16
  end
data/lib/pique/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pique
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
data/pique.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.require_paths = ["lib"]
34
34
 
35
35
  # Uncomment to register a new dependency of your gem
36
- spec.add_dependency "sidekiq", "~> 5.0"
36
+ # spec.add_dependency "sidekiq", ">= 5.0"
37
37
 
38
38
  # For more information and examples about making a new gem, check out our
39
39
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pique
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bilal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: sidekiq
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.0'
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: Pique is a Rails plugin that monitors your jobs.
28
14
  email:
29
15
  - bilal@bilalbudhani.com