cronitor 5.0.0 → 5.1.0

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: 1c33ade0ff17f4941318a1483b1255556d2b5d7b3c89c41fa70ffb9d6bc05a4b
4
- data.tar.gz: 2e2c69fe75cf72f65964d59994a3dce7e58266449bd21be76428b4c1f32d354a
3
+ metadata.gz: ac1824833468d92068ba5664ef8d667fbe2518b34caa8da2cae3a307a7a923e7
4
+ data.tar.gz: 18ff6d1f48bd6da9686930585b6eaab3d296caedb33c171a5d668c26b69fdaba
5
5
  SHA512:
6
- metadata.gz: 98a47cd2ded8d3661ea8527b4dfd4b457b6b6d92ed101fac6f58e5d43eb791564b7f074dbfed5019036f9b1a01ed3f6f0687d8bbd90c5c19f3a7cf21cbe5d5d0
7
- data.tar.gz: f69e2de58e9cfa009e4255c6613e5338d68babdac5bd3848e9b1aea8ee4e6411694750b4e933dadaa447a0033b51f4ef120801e5305f704785c7bfedb4ce79ee
6
+ metadata.gz: 3d6e6aeaaaf3c0a8e5942132e833f53169756717dfa49d52d6641dc0a644f470cac6cc2124fdaebf12fb7814b485f9a14753c78a2a059541b94662c9127279a7
7
+ data.tar.gz: e2d4da41d199b4ff8c01fa768f69f0a48303c98559a2766f537b0a25f6940df21c0ecd2c94d4318636623f230cd8ff7976b75a3219ece9cae419b6eafa8b10ff
@@ -15,15 +15,14 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
 
17
17
  steps:
18
- - uses: actions/checkout@v2
19
- - name: Set up Ruby 2.7
20
- uses: actions/setup-ruby@v1
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
21
  with:
22
- ruby-version: 2.7.x
22
+ ruby-version: 2.7
23
+ bundler-cache: true
23
24
  - name: Build and test with Rake
24
25
  run: |
25
- gem install bundler
26
- bundle install --jobs 4 --retry 3
27
26
  bundle exec rake release
28
27
  with:
29
28
  api_key: ${{secrets.RUBYGEMS_API_KEY}}
@@ -10,25 +10,25 @@ on:
10
10
  - master
11
11
 
12
12
  jobs:
13
- lint:
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- ruby:
18
- - '2.7'
19
- - '3.0'
13
+ # lint:
14
+ # strategy:
15
+ # fail-fast: false
16
+ # matrix:
17
+ # ruby:
18
+ # - '2.7'
19
+ # - '3.0'
20
20
 
21
- runs-on: ubuntu-latest
21
+ # runs-on: ubuntu-latest
22
22
 
23
- steps:
24
- - uses: actions/checkout@v2
25
- - name: Set up Ruby 2.7
26
- uses: ruby/setup-ruby@v1
27
- with:
28
- ruby-version: ${{ matrix.ruby }}
29
- bundler-cache: true
30
- - name: Run Rubocop
31
- run: bundle exec rake rubocop
23
+ # steps:
24
+ # - uses: actions/checkout@v2
25
+ # - name: Set up Ruby 2.7
26
+ # uses: ruby/setup-ruby@v1
27
+ # with:
28
+ # ruby-version: ${{ matrix.ruby }}
29
+ # bundler-cache: true
30
+ # - name: Run Rubocop
31
+ # run: bundle exec rake rubocop
32
32
 
33
33
  spec:
34
34
  strategy:
@@ -37,18 +37,18 @@ jobs:
37
37
  ruby:
38
38
  - '2.7'
39
39
  - '3.0'
40
+ - '3.1'
41
+ - '3.2'
40
42
 
41
43
  runs-on: ubuntu-latest
42
44
 
43
45
  steps:
44
- - uses: actions/checkout@v2
45
- - name: Set up Ruby 2.7
46
+ - uses: actions/checkout@v3
47
+ - name: Set up Ruby
46
48
  uses: ruby/setup-ruby@v1
47
49
  with:
48
50
  ruby-version: ${{ matrix.ruby }}
49
51
  bundler-cache: true
50
52
  - name: Build and test with Rake
51
53
  run: |
52
- gem install bundler
53
- bundle install --jobs 4 --retry 3
54
54
  bundle exec rake
data/README.md CHANGED
@@ -29,8 +29,8 @@ The `Cronitor#job` helper will send telemetry events before calling your block a
29
29
  require 'cronitor'
30
30
  Cronitor.api_key = 'api_key_123'
31
31
 
32
- Cronitor.job 'warehouse-replenishmenth-report' do
33
- ReplenishmentReport.new(Date.today).run()
32
+ Cronitor.job 'important-job' do
33
+ ImportantJob.new(Date.today).run()
34
34
  end
35
35
  ```
36
36
 
@@ -40,7 +40,7 @@ Cronitor provides a [separate library](https://github.com/cronitorio/cronitor-si
40
40
 
41
41
  ## Sending Telemetry Events
42
42
 
43
- If you want finer control over when/how [telemetry pings](https://cronitor.io/docs/telemetry-api) are sent,
43
+ If you want more control over when/how [telemetry pings](https://cronitor.io/docs/telemetry-api) are sent,
44
44
  you can instantiate a monitor and call `#ping`.
45
45
 
46
46
  ```ruby
@@ -132,7 +132,7 @@ You can also create and update monitors by calling `Monitor.put`.
132
132
  ```ruby
133
133
  require 'cronitor'
134
134
 
135
- monitors = Cronitor::Monitor.put([
135
+ monitors = [
136
136
  {
137
137
  type: 'job',
138
138
  key: 'send-customer-invoices',
@@ -148,13 +148,15 @@ monitors = Cronitor::Monitor.put([
148
148
  request: {
149
149
  url: 'https://cronitor.io'
150
150
  },
151
- schedule: 'every 45 seconds',
151
+ schedule: 'every 60 seconds',
152
152
  assertions: [
153
153
  'response.code = 200',
154
154
  'response.time < 600ms',
155
155
  ]
156
156
  }
157
- ])
157
+ ]
158
+
159
+ Cronitor::Monitor.put(monitors)
158
160
  ```
159
161
 
160
162
  ### Pause, Reset, Delete
@@ -9,7 +9,7 @@ module Cronitor
9
9
  YAML_KEYS = MONITOR_TYPES.map { |t| "#{t}s" }
10
10
 
11
11
  class << self
12
- attr_accessor :api_key, :api_version, :environment, :logger, :config, :timeout, :ping_timeout
12
+ attr_accessor :api_key, :api_version, :environment, :logger, :config, :timeout, :ping_timeout, :auto_discover_sidekiq
13
13
 
14
14
  def configure(&block)
15
15
  block.call(self)
@@ -22,6 +22,7 @@ module Cronitor
22
22
  self.timeout = ENV.fetch('CRONITOR_TIMEOUT', nil) || 10
23
23
  self.ping_timeout = ENV.fetch('CRONITOR_PING_TIMEOUT', nil) || 5
24
24
  self.config = ENV.fetch('CRONITOR_CONFIG', nil)
25
+ self.auto_discover_sidekiq = ENV.fetch('CRONITOR_AUTO_DISCOVER_SIDEKIQ', 'true').casecmp('true').zero? # https://github.com/cronitorio/cronitor-sidekiq
25
26
  self.logger = Logger.new($stdout)
26
27
  logger.level = Logger::INFO
27
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cronitor
4
- VERSION = '5.0.0'
4
+ VERSION = '5.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Byrnes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-05-02 00:00:00.000000000 Z
12
+ date: 2023-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty