EventChart 2022.6.9 → 2022.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eventchart.js.rb +15 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dfaa44bcfe12d5e1607506f0f1c3bc0693a868c926612a2ab9bdfcfac1af084
|
4
|
+
data.tar.gz: 4edb737eccf9e7d36decf023c2514fe2dca8fd9cdbc59ba0e971a5b9f2ae42cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba326bb1aa69a26a72ee9870c0d7b5dc613b01867bf11d35539a0cced522bca6f1f7fdf3b5b067cf47d255015aa6825eb4d3d2c1e36fbe76bbba0d8d399557c3
|
7
|
+
data.tar.gz: 67058f349810fd7e879abb740448863720b64a1ff9e1150682c3fb4d2b167674b628dcff8da8d8e0e487ba800d3787a645653a79de58d3dc05e6fa38f4bd9d1b
|
data/lib/eventchart.js.rb
CHANGED
@@ -11,6 +11,19 @@ class EventChart
|
|
11
11
|
@events=[] # Event list
|
12
12
|
end
|
13
13
|
|
14
|
+
# Schedule a timer to wirte evnetys.
|
15
|
+
def scheduleWriteEventTimer
|
16
|
+
time=Time.now
|
17
|
+
|
18
|
+
if (time-@lastTimerTime)>1 # 1 timer 1 second at most
|
19
|
+
@timer&.cancel # Cancel existing timer.
|
20
|
+
|
21
|
+
@timer = EventMachine::Timer.new(10) { writeEvents }
|
22
|
+
|
23
|
+
@lastTimerTime= time
|
24
|
+
end #if (time-@lastTimerTime)>1 # 1 timer 1 second at most
|
25
|
+
end
|
26
|
+
|
14
27
|
# 解压
|
15
28
|
def reportEvent(eventType, event)
|
16
29
|
event['eventType']=eventType
|
@@ -19,9 +32,8 @@ class EventChart
|
|
19
32
|
|
20
33
|
#EventMachine.add_timer(10) { writeEvents }
|
21
34
|
|
22
|
-
|
23
|
-
|
24
|
-
@timer = EventMachine::Timer.new(10) { writeEvents }
|
35
|
+
scheduleWriteEventTimer # Schedule a timer to wirte evnetys.
|
36
|
+
|
25
37
|
end # def exuz(rootPath)
|
26
38
|
|
27
39
|
def writeEvents
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: EventChart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.6.
|
4
|
+
version: 2022.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hxcan Cai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cod
|