process_bot 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a955f30c30ca3ec6ae94f3684d492c06b7a0d40042c5de324ced6681720fbb4b
4
- data.tar.gz: eaae86a1fead6761d82a2f8bd82fa73772351c2e7c307ac3b0e681e435c798bb
3
+ metadata.gz: 29f1d0a6e2f8360306d132467bcb8b562d126f799dd9d4fbc510128b58ef2f44
4
+ data.tar.gz: 67cfeb1bb088f7b8acaa543e216a365566993aea81fae49366cc4f19510b54c8
5
5
  SHA512:
6
- metadata.gz: 9ed08da8b21e32e38d93fb65bff64ec3ef90678ae210b17cc11640829e24c29ef132955ca7fe102444f4f470c2468ce03d78a2b68b3b468a066e84f9126a264a
7
- data.tar.gz: 86ba81368cbddf10daf0b8ec9f189c03214e6ea15fb03be45a1e68aaf774f9043e48c608ce64e7933a3f04fc19a6a013c16f03b93773eb1d5a6e03daad52758b
6
+ metadata.gz: 0a205be1611136f88f7bb5165f2db1a8296b2bc8a1eec383dcf7b32324a6d8ba98e824b9c29f9c1818b24b412b1964d88ba11ab60e56f291d97279b291140c49
7
+ data.tar.gz: b045d94ae4d0d4c92ae6f919411e0fbf33e44ddb4a0606515439c6e0313f73538baaa8674191fb5d37dcf89b81971a509d58007c8ea9d041b30b74d27fdadc2f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- process_bot (0.1.10)
4
+ process_bot (0.1.12)
5
5
  knjrbfw (>= 0.0.116)
6
6
  pry
7
7
  rake
data/README.md CHANGED
@@ -37,6 +37,24 @@ Run commands in the command line like this:
37
37
  cap production process_bot:sidekiq:graceful
38
38
  ```
39
39
 
40
+ ### Capistrano tasks
41
+
42
+ ProcessBot provides these Sidekiq tasks:
43
+ - `process_bot:sidekiq:start`
44
+ - `process_bot:sidekiq:stop`
45
+ - `process_bot:sidekiq:graceful` (stops fetching new jobs and waits for running jobs by default)
46
+ - `process_bot:sidekiq:graceful_no_wait` (stops fetching new jobs and returns immediately)
47
+ - `process_bot:sidekiq:restart`
48
+
49
+ ### CLI options
50
+
51
+ When running ProcessBot directly, you can control graceful waiting and log file output:
52
+
53
+ ```bash
54
+ bundle exec process_bot --command graceful --wait-for-gracefully-stopped false
55
+ bundle exec process_bot --command start --log-file-path /var/log/process_bot.log
56
+ ```
57
+
40
58
  ## Development
41
59
 
42
60
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -21,8 +21,12 @@ class ProcessBot::ClientSocket
21
21
 
22
22
  def send_command(data) # rubocop:disable Metrics/AbcSize
23
23
  logger.logs "Sending: #{data}"
24
- client.puts(JSON.generate(data))
25
- response_raw = client.gets
24
+ begin
25
+ client.puts(JSON.generate(data))
26
+ response_raw = client.gets
27
+ rescue Errno::ECONNRESET, Errno::EPIPE
28
+ return :nil
29
+ end
26
30
 
27
31
  # Happens if process is interrupted
28
32
  return :nil if response_raw.nil?
@@ -1,3 +1,3 @@
1
1
  module ProcessBot
2
- VERSION = "0.1.10".freeze
2
+ VERSION = "0.1.12".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-12-30 00:00:00.000000000 Z
11
+ date: 2026-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: knjrbfw