async-background 0.2.1 → 0.2.3
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 +4 -4
- data/lib/async/background/runner.rb +2 -2
- data/lib/async/background/version.rb +1 -1
- data/lib/async/background.rb +8 -0
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b409d6d47d2a0fe38a1fdc22c77beb20051563dcd8aa382b394414dc08735a5
|
|
4
|
+
data.tar.gz: 1bb9c298d88b15369c45abd76555e319d2afb0f5e20895f470af44fe85b0eb18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 596ea84aeab91edae0d85c8361107fbbcbf431e0f76e11863958b7200db1d16258ae1fe73189f433042faa1fbf59ffe87d1e72484c4ca2da16fd45a23cf307f6
|
|
7
|
+
data.tar.gz: 3d48231e0018d95a707aff6eceeb569eb85565c251f026afb4b592c418300eeed84cb37c4c655d1520d7bed31d461551cb9be387c73e207912c44a61201059aa
|
|
@@ -14,8 +14,8 @@ module Async
|
|
|
14
14
|
class Runner
|
|
15
15
|
attr_reader :logger, :semaphore, :heap, :worker_index, :total_workers
|
|
16
16
|
|
|
17
|
-
def initialize(config_path:, job_count: 2, worker_index:, total_workers
|
|
18
|
-
@logger =
|
|
17
|
+
def initialize(config_path:, job_count: 2, worker_index:, total_workers:)
|
|
18
|
+
@logger = Console.logger
|
|
19
19
|
@worker_index = worker_index
|
|
20
20
|
@total_workers = total_workers
|
|
21
21
|
@running = true
|
data/lib/async/background.rb
CHANGED
|
@@ -6,6 +6,14 @@ require 'console'
|
|
|
6
6
|
require 'fugit'
|
|
7
7
|
|
|
8
8
|
require_relative 'background/version'
|
|
9
|
+
|
|
10
|
+
# Warn if using an unstable version
|
|
11
|
+
unless ['0.1.0', '0.2.2', '0.2.3'].include?(Async::Background::VERSION)
|
|
12
|
+
warn "\n⚠️ WARNING: Async::Background v#{Async::Background::VERSION} is not a stable version!"
|
|
13
|
+
warn "⚠️ Stable versions are: 0.1.0, 0.2.2, and 0.2.3"
|
|
14
|
+
warn "⚠️ For production use, pin to one of these versions in your Gemfile\n\n"
|
|
15
|
+
end
|
|
16
|
+
|
|
9
17
|
require_relative 'background/min_heap'
|
|
10
18
|
require_relative 'background/entry'
|
|
11
19
|
require_relative 'background/runner'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-background
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roman Hajdarov
|
|
@@ -80,12 +80,11 @@ dependencies:
|
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '3.12'
|
|
83
|
-
description:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
with any Async-based application.
|
|
83
|
+
description: "[STABLE VERSIONS: 0.1.0, 0.2.2, 0.2.3] A production-grade lightweight
|
|
84
|
+
scheduler built on top of Async. Single event loop with min-heap timer, skip-overlapping
|
|
85
|
+
execution, jitter, monotonic clock intervals, semaphore concurrency control, and
|
|
86
|
+
deterministic worker sharding. Designed for Falcon but works with any Async-based
|
|
87
|
+
application."
|
|
89
88
|
email:
|
|
90
89
|
- romnhajdarov@gmail.com
|
|
91
90
|
executables: []
|