hydragen 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hydragen.gemspec +1 -1
- data/lib/hydragen.rb +8 -2
- metadata +6 -7
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3451f70a497c06e8231fec93624cc5854c772f440741e5603768e9b50bddb42
|
4
|
+
data.tar.gz: 129b57cd0accc0fa782864b3965cd18d7ea9520067b3f52e06503385da0effed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fae01b0bb66d7e9678ead5836097c963895369a16e6ee0c8c962d5710c6ef0885b1719052c113ecb6ec9d0bab3ee61d13de67024761afa625b25d53e3284194
|
7
|
+
data.tar.gz: 2fe9125b617dcf46d713de09ac796ab5ab4f6db5775c5f12f1f1a11293d6427dcc0101fa145343cc3c87ed585db3f35acf286311553feb09c3a6a323ab080ae1
|
data/hydragen.gemspec
CHANGED
data/lib/hydragen.rb
CHANGED
@@ -2,6 +2,12 @@ STDOUT.sync = true
|
|
2
2
|
|
3
3
|
=begin
|
4
4
|
|
5
|
+
mkdir -p hydragen/{todo,live,fail,done}
|
6
|
+
mysql busykid -BN -e "select id from buckets where type='spendcard'" | \
|
7
|
+
ruby -ne 'File.open("hydragen/todo/#{$_.chomp}", "a") {}'
|
8
|
+
(script_name num_workers)
|
9
|
+
rm -rf hydragen
|
10
|
+
|
5
11
|
hydragen/
|
6
12
|
todo/* <= area holding all pending tasks
|
7
13
|
live/* <= jobs that are being processed
|
@@ -12,7 +18,7 @@ hydragen/
|
|
12
18
|
|
13
19
|
# get files
|
14
20
|
base = "hydragen"
|
15
|
-
list = Dir[File.join(base,
|
21
|
+
list = Dir[File.join(base, "todo", '*')].sort - ['.', '..']
|
16
22
|
|
17
23
|
# spawn jobs (optional)
|
18
24
|
jobs = ARGV.first.to_i
|
@@ -28,7 +34,7 @@ $task = 0
|
|
28
34
|
# process list
|
29
35
|
rows = 0
|
30
36
|
list.each do |todo|
|
31
|
-
break if File.
|
37
|
+
break if File.exist?("stop.now")
|
32
38
|
|
33
39
|
# build filenames
|
34
40
|
file = File.basename(todo)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydragen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem divides work and conquers.
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -16,7 +16,6 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
-
- ".ruby-version"
|
20
19
|
- Gemfile
|
21
20
|
- LICENSE
|
22
21
|
- README.md
|
@@ -26,7 +25,7 @@ homepage: https://github.com/shreeve/hydragen
|
|
26
25
|
licenses:
|
27
26
|
- MIT
|
28
27
|
metadata: {}
|
29
|
-
post_install_message:
|
28
|
+
post_install_message:
|
30
29
|
rdoc_options: []
|
31
30
|
require_paths:
|
32
31
|
- lib
|
@@ -41,8 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
40
|
- !ruby/object:Gem::Version
|
42
41
|
version: '0'
|
43
42
|
requirements: []
|
44
|
-
rubygems_version: 3.
|
45
|
-
signing_key:
|
43
|
+
rubygems_version: 3.4.3
|
44
|
+
signing_key:
|
46
45
|
specification_version: 4
|
47
46
|
summary: Spawn multiple processes to perform simulataneous jobs
|
48
47
|
test_files: []
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5
|