zillabyte-cli 0.9.44 → 0.9.45
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDIxYzA1NWYzMWUwYWI1ZTE1MzRiZDNjOTkxYjNmNTlmYmVkODVkZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTgyZTY4Mjc4MzM5OGFhODEzZTA3YjA5YWVlYzZhNDM0NTFlZDhhNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWQwNTFlNjY4ODU3ZjU2MDliZjRlMWVhZDAxNjA5M2U2MThmMGY0ZWYwY2My
|
10
|
+
N2NkNTgwNGI0YTI0ZGZmYTllNDUzMmI5ZTdkY2M3YzMzNzQ2Y2Y0OTA1MGE4
|
11
|
+
ZGI0YzRkZmMzMDk2Y2U1ZjUxNjE2YTQwNmZkNzFjMGUwN2U0NzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjFlNDE5OWE4NjgyMTY2NzgxOTM4M2I2NWY1NTM4ZTU3MWQ5NzM4Nzc3M2Jl
|
14
|
+
Nzk3YzcwNGNjZDE1ZDQ3OTdiM2YzNmU0YmIwMzc2NzY3NjY4NzhlMmRlMjU2
|
15
|
+
NDNiZjU5MDU1MmM0NGY1MDBiZjM5MGVlMmVhMTQ0MWEzOTQzNzE=
|
data/lib/zillabyte/cli/flows.rb
CHANGED
@@ -809,24 +809,28 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
|
|
809
809
|
begin
|
810
810
|
PTY.spawn(cmd) do |r, w, pid|
|
811
811
|
done_cycle = false
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
line
|
818
|
-
|
819
|
-
if
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
812
|
+
begin
|
813
|
+
r.each do |line|
|
814
|
+
if options[:verbose]
|
815
|
+
display line
|
816
|
+
else
|
817
|
+
if(line.include? match_str)
|
818
|
+
line = line.chomp!.split(match_str).last
|
819
|
+
if !done_cycle
|
820
|
+
if line.include? "[ERROR]"
|
821
|
+
display line.colorize(:red)
|
822
|
+
elsif line.include? "sinking tuple:"
|
823
|
+
display line.colorize(:green)
|
824
|
+
else
|
825
|
+
display line
|
826
|
+
end
|
825
827
|
end
|
826
828
|
end
|
829
|
+
done_cycle = true if(line.include? "[app][RUN] Transitioned to state WAITING" or line.include? "[app][RUN] Transitioned to state IDLE")
|
827
830
|
end
|
828
|
-
done_cycle = true if(line.include? "[app][RUN] Transitioned to state WAITING" or line.include? "[app][RUN] Transitioned to state IDLE")
|
829
831
|
end
|
832
|
+
rescue Errno::EIO => e
|
833
|
+
# process has finished
|
830
834
|
end
|
831
835
|
end
|
832
836
|
rescue Exception => e
|
@@ -1,17 +1,15 @@
|
|
1
1
|
import zillabyte
|
2
2
|
|
3
|
-
def prep(controller):
|
4
|
-
return
|
5
|
-
|
6
3
|
# This is the heart of your algorithm. It's processed on every
|
7
4
|
# web page. This algorithm is run in parallel on possibly hundreds
|
8
5
|
# of machines.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
class MyEach:
|
7
|
+
def execute(self, controller, tup):
|
8
|
+
if("hello world" in tup["html"]):
|
9
|
+
controller.emit("has_hello_world",{"url":tup["url"]})
|
10
|
+
return
|
13
11
|
|
14
12
|
app = zillabyte.app(name = "hello_world")
|
15
|
-
app.source(
|
16
|
-
.each(
|
13
|
+
app.source("homepages")\
|
14
|
+
.each(MyEach)\
|
17
15
|
.sink(name = "has_hello_world", columns = [{"url":"string"}])
|
@@ -30,26 +30,30 @@ class LogFetcher
|
|
30
30
|
PTY.spawn( cmd ) do |r, w, pid|
|
31
31
|
@pid = pid;
|
32
32
|
break if @terminate
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
33
|
+
begin
|
34
|
+
r.each do |line|
|
35
|
+
begin
|
36
|
+
op = line.match(/\[(.*?)\]/)[0].to_s[1...-1]
|
37
|
+
|
38
|
+
op_name = op.split(".")[0]
|
39
|
+
next if op_name != operation and operation != "_ALL_"
|
40
|
+
line_split = line.split("[")
|
41
|
+
print line_split[0] + "[" + op.colorize(color_for(op)) + line_split[1..-1].join("[")[op.length..-1] unless line.include?("[HIDDEN]")
|
42
|
+
|
43
|
+
done = false
|
44
|
+
exit_on.each do |exit_str|
|
45
|
+
if line.include? exit_str
|
46
|
+
done = true
|
47
|
+
break
|
48
|
+
end
|
47
49
|
end
|
50
|
+
break if done
|
51
|
+
rescue Exception => e
|
52
|
+
next
|
48
53
|
end
|
49
|
-
break if done
|
50
|
-
rescue Exception => e
|
51
|
-
next
|
52
54
|
end
|
55
|
+
rescue Errno::EIO => e
|
56
|
+
# process has finished
|
53
57
|
end
|
54
58
|
end
|
55
59
|
rescue PTY::ChildExited => e
|
@@ -87,4 +91,4 @@ class LogFetcher
|
|
87
91
|
lf
|
88
92
|
end
|
89
93
|
|
90
|
-
end
|
94
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillabyte-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zillabyte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|