triglav-agent 1.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +6 -0
  5. data/.yardopts +6 -0
  6. data/CHANGELOG.md +3 -0
  7. data/CODE_OF_CONDUCT.md +49 -0
  8. data/Gemfile +5 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +59 -0
  11. data/Rakefile +11 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/docs/Triglav/Agent/ApiClient/AuthenticationError.html +150 -0
  15. data/docs/Triglav/Agent/ApiClient/ConnectionError.html +150 -0
  16. data/docs/Triglav/Agent/ApiClient/Error.html +296 -0
  17. data/docs/Triglav/Agent/ApiClient.html +545 -0
  18. data/docs/Triglav/Agent/Base/CLI.html +498 -0
  19. data/docs/Triglav/Agent/Base/Connection.html +258 -0
  20. data/docs/Triglav/Agent/Base/Monitor.html +370 -0
  21. data/docs/Triglav/Agent/Base/Processor.html +623 -0
  22. data/docs/Triglav/Agent/Base/Setting.html +1081 -0
  23. data/docs/Triglav/Agent/Base/Worker.html +635 -0
  24. data/docs/Triglav/Agent/Base.html +121 -0
  25. data/docs/Triglav/Agent/Configuration.html +967 -0
  26. data/docs/Triglav/Agent/Error.html +130 -0
  27. data/docs/Triglav/Agent/HashUtil.html +351 -0
  28. data/docs/Triglav/Agent/LogFormatter.html +271 -0
  29. data/docs/Triglav/Agent/Logger.html +287 -0
  30. data/docs/Triglav/Agent/StorageFile.html +1130 -0
  31. data/docs/Triglav/Agent/Timer.html +424 -0
  32. data/docs/Triglav/Agent/TooManyError.html +134 -0
  33. data/docs/Triglav/Agent.html +131 -0
  34. data/docs/Triglav.html +119 -0
  35. data/docs/_index.html +335 -0
  36. data/docs/class_list.html +51 -0
  37. data/docs/css/common.css +1 -0
  38. data/docs/css/full_list.css +58 -0
  39. data/docs/css/style.css +481 -0
  40. data/docs/file.LICENSE.html +72 -0
  41. data/docs/file.README.html +137 -0
  42. data/docs/file_list.html +61 -0
  43. data/docs/frames.html +17 -0
  44. data/docs/index.html +137 -0
  45. data/docs/js/app.js +243 -0
  46. data/docs/js/full_list.js +216 -0
  47. data/docs/js/jquery.js +4 -0
  48. data/docs/method_list.html +659 -0
  49. data/docs/top-level-namespace.html +112 -0
  50. data/example/config.yml +40 -0
  51. data/lib/triglav/agent/api_client.rb +199 -0
  52. data/lib/triglav/agent/base/cli.rb +98 -0
  53. data/lib/triglav/agent/base/connection.rb +30 -0
  54. data/lib/triglav/agent/base/monitor.rb +32 -0
  55. data/lib/triglav/agent/base/processor.rb +136 -0
  56. data/lib/triglav/agent/base/setting.rb +112 -0
  57. data/lib/triglav/agent/base/worker.rb +95 -0
  58. data/lib/triglav/agent/configuration.rb +79 -0
  59. data/lib/triglav/agent/error.rb +4 -0
  60. data/lib/triglav/agent/hash_util.rb +36 -0
  61. data/lib/triglav/agent/logger.rb +50 -0
  62. data/lib/triglav/agent/storage_file.rb +144 -0
  63. data/lib/triglav/agent/timer.rb +80 -0
  64. data/lib/triglav/agent/version.rb +5 -0
  65. data/lib/triglav/agent.rb +20 -0
  66. data/lib/triglav-agent.rb +1 -0
  67. data/triglav-agent.gemspec +33 -0
  68. metadata +250 -0
@@ -0,0 +1,623 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Triglav::Agent::Base::Processor
8
+
9
+ &mdash; Documentation by YARD 0.9.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Triglav::Agent::Base::Processor";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (P)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Triglav.html" title="Triglav (module)">Triglav</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Agent.html" title="Triglav::Agent (module)">Agent</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Base.html" title="Triglav::Agent::Base (module)">Base</a></span></span>
41
+ &raquo;
42
+ <span class="title">Processor</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame" src="../../../class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Class: Triglav::Agent::Base::Processor
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">Object</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">Triglav::Agent::Base::Processor</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/triglav/agent/base/processor.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Triglav agent processor class.</p>
108
+
109
+ <p>An instance is created for a `resource_uri_prefix`.</p>
110
+
111
+ <p>You usually do not need to customize this class, but if you want to
112
+ implement your original, configure</p>
113
+
114
+ <pre class="code ruby"><code class="ruby"><span class='const'>Triglav</span><span class='op'>::</span><span class='const'>Agent</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_processor_class'>processor_class</span>
115
+ </code></pre>
116
+
117
+
118
+ </div>
119
+ </div>
120
+ <div class="tags">
121
+
122
+
123
+ </div>
124
+
125
+
126
+
127
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#resource_uri_prefix-instance_method" title="#resource_uri_prefix (instance method)">#<strong>resource_uri_prefix</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+ <span class="note title readonly">readonly</span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Returns the value of attribute resource_uri_prefix.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#worker-instance_method" title="#worker (instance method)">#<strong>worker</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+ <span class="note title readonly">readonly</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>Returns the value of attribute worker.</p>
183
+ </div></span>
184
+
185
+ </li>
186
+
187
+
188
+ </ul>
189
+
190
+
191
+
192
+
193
+
194
+ <h2>
195
+ Class Method Summary
196
+ <small><a href="#" class="summary_toggle">collapse</a></small>
197
+ </h2>
198
+
199
+ <ul class="summary">
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#max_consecuitive_error_count-class_method" title="max_consecuitive_error_count (class method)">.<strong>max_consecuitive_error_count</strong> &#x21d2; Object </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'></div></span>
219
+
220
+ </li>
221
+
222
+
223
+ </ul>
224
+
225
+ <h2>
226
+ Instance Method Summary
227
+ <small><a href="#" class="summary_toggle">collapse</a></small>
228
+ </h2>
229
+
230
+ <ul class="summary">
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(worker, resource_uri_prefix) &#x21d2; Processor </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+ <span class="note title constructor">constructor</span>
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ <span class="summary_desc"><div class='inline'>
252
+ <p>A new instance of Processor.</p>
253
+ </div></span>
254
+
255
+ </li>
256
+
257
+
258
+ <li class="public ">
259
+ <span class="summary_signature">
260
+
261
+ <a href="#process-instance_method" title="#process (instance method)">#<strong>process</strong> &#x21d2; Object </a>
262
+
263
+
264
+
265
+ </span>
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <span class="summary_desc"><div class='inline'></div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#total_count-instance_method" title="#total_count (instance method)">#<strong>total_count</strong> &#x21d2; Object </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'></div></span>
298
+
299
+ </li>
300
+
301
+
302
+ </ul>
303
+
304
+
305
+ <div id="constructor_details" class="method_details_list">
306
+ <h2>Constructor Details</h2>
307
+
308
+ <div class="method_details first">
309
+ <h3 class="signature first" id="initialize-instance_method">
310
+
311
+ #<strong>initialize</strong>(worker, resource_uri_prefix) &#x21d2; <tt><span class='object_link'><a href="" title="Triglav::Agent::Base::Processor (class)">Processor</a></span></tt>
312
+
313
+
314
+
315
+
316
+
317
+ </h3><div class="docstring">
318
+ <div class="discussion">
319
+
320
+ <p>Returns a new instance of Processor</p>
321
+
322
+
323
+ </div>
324
+ </div>
325
+ <div class="tags">
326
+
327
+
328
+ </div><table class="source_code">
329
+ <tr>
330
+ <td>
331
+ <pre class="lines">
332
+
333
+
334
+ 17
335
+ 18
336
+ 19
337
+ 20
338
+ 21
339
+ 22
340
+ 23
341
+ 24
342
+ 25
343
+ 26
344
+ 27</pre>
345
+ </td>
346
+ <td>
347
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 17</span>
348
+
349
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_worker'>worker</span><span class='comma'>,</span> <span class='id identifier rubyid_resource_uri_prefix'>resource_uri_prefix</span><span class='rparen'>)</span>
350
+ <span class='ivar'>@worker</span> <span class='op'>=</span> <span class='id identifier rubyid_worker'>worker</span>
351
+ <span class='ivar'>@resource_uri_prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_resource_uri_prefix'>resource_uri_prefix</span>
352
+ <span class='ivar'>@connection_pool</span> <span class='op'>=</span> <span class='const'>ConnectionPool</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_connection_pool_opts'>connection_pool_opts</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
353
+ <span class='id identifier rubyid_connection_class'>connection_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_get_connection_info'>get_connection_info</span><span class='lparen'>(</span><span class='id identifier rubyid_resource_uri_prefix'>resource_uri_prefix</span><span class='rparen'>)</span><span class='rparen'>)</span>
354
+ <span class='rbrace'>}</span>
355
+ <span class='ivar'>@api_client_pool</span> <span class='op'>=</span> <span class='const'>ConnectionPool</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_connection_pool_opts'>connection_pool_opts</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
356
+ <span class='const'>ApiClient</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='comment'># renew connection
357
+ </span> <span class='rbrace'>}</span>
358
+ <span class='ivar'>@mutex</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
359
+ <span class='kw'>end</span></pre>
360
+ </td>
361
+ </tr>
362
+ </table>
363
+ </div>
364
+
365
+ </div>
366
+
367
+ <div id="instance_attr_details" class="attr_details">
368
+ <h2>Instance Attribute Details</h2>
369
+
370
+
371
+ <span id=""></span>
372
+ <div class="method_details first">
373
+ <h3 class="signature first" id="resource_uri_prefix-instance_method">
374
+
375
+ #<strong>resource_uri_prefix</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
376
+
377
+
378
+
379
+
380
+
381
+ </h3><div class="docstring">
382
+ <div class="discussion">
383
+
384
+ <p>Returns the value of attribute resource_uri_prefix</p>
385
+
386
+
387
+ </div>
388
+ </div>
389
+ <div class="tags">
390
+
391
+
392
+ </div><table class="source_code">
393
+ <tr>
394
+ <td>
395
+ <pre class="lines">
396
+
397
+
398
+ 15
399
+ 16
400
+ 17</pre>
401
+ </td>
402
+ <td>
403
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 15</span>
404
+
405
+ <span class='kw'>def</span> <span class='id identifier rubyid_resource_uri_prefix'>resource_uri_prefix</span>
406
+ <span class='ivar'>@resource_uri_prefix</span>
407
+ <span class='kw'>end</span></pre>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+ </div>
412
+
413
+
414
+ <span id=""></span>
415
+ <div class="method_details ">
416
+ <h3 class="signature " id="worker-instance_method">
417
+
418
+ #<strong>worker</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
419
+
420
+
421
+
422
+
423
+
424
+ </h3><div class="docstring">
425
+ <div class="discussion">
426
+
427
+ <p>Returns the value of attribute worker</p>
428
+
429
+
430
+ </div>
431
+ </div>
432
+ <div class="tags">
433
+
434
+
435
+ </div><table class="source_code">
436
+ <tr>
437
+ <td>
438
+ <pre class="lines">
439
+
440
+
441
+ 15
442
+ 16
443
+ 17</pre>
444
+ </td>
445
+ <td>
446
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 15</span>
447
+
448
+ <span class='kw'>def</span> <span class='id identifier rubyid_worker'>worker</span>
449
+ <span class='ivar'>@worker</span>
450
+ <span class='kw'>end</span></pre>
451
+ </td>
452
+ </tr>
453
+ </table>
454
+ </div>
455
+
456
+ </div>
457
+
458
+
459
+ <div id="class_method_details" class="method_details_list">
460
+ <h2>Class Method Details</h2>
461
+
462
+
463
+ <div class="method_details first">
464
+ <h3 class="signature first" id="max_consecuitive_error_count-class_method">
465
+
466
+ .<strong>max_consecuitive_error_count</strong> &#x21d2; <tt>Object</tt>
467
+
468
+
469
+
470
+
471
+
472
+ </h3><table class="source_code">
473
+ <tr>
474
+ <td>
475
+ <pre class="lines">
476
+
477
+
478
+ 29
479
+ 30
480
+ 31</pre>
481
+ </td>
482
+ <td>
483
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 29</span>
484
+
485
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_max_consecuitive_error_count'>max_consecuitive_error_count</span>
486
+ <span class='int'>3</span>
487
+ <span class='kw'>end</span></pre>
488
+ </td>
489
+ </tr>
490
+ </table>
491
+ </div>
492
+
493
+ </div>
494
+
495
+ <div id="instance_method_details" class="method_details_list">
496
+ <h2>Instance Method Details</h2>
497
+
498
+
499
+ <div class="method_details first">
500
+ <h3 class="signature first" id="process-instance_method">
501
+
502
+ #<strong>process</strong> &#x21d2; <tt>Object</tt>
503
+
504
+
505
+
506
+
507
+
508
+ </h3><table class="source_code">
509
+ <tr>
510
+ <td>
511
+ <pre class="lines">
512
+
513
+
514
+ 33
515
+ 34
516
+ 35
517
+ 36
518
+ 37
519
+ 38
520
+ 39
521
+ 40
522
+ 41
523
+ 42
524
+ 43
525
+ 44
526
+ 45
527
+ 46
528
+ 47
529
+ 48
530
+ 49
531
+ 50
532
+ 51
533
+ 52
534
+ 53
535
+ 54
536
+ 55
537
+ 56
538
+ 57
539
+ 58
540
+ 59
541
+ 60
542
+ 61</pre>
543
+ </td>
544
+ <td>
545
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 33</span>
546
+
547
+ <span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span>
548
+ <span class='id identifier rubyid_success_count'>success_count</span> <span class='op'>=</span> <span class='int'>0</span>
549
+ <span class='id identifier rubyid_consecutive_error_count'>consecutive_error_count</span> <span class='op'>=</span> <span class='int'>0</span>
550
+ <span class='const'>Parallel</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='id identifier rubyid_resources'>resources</span><span class='comma'>,</span> <span class='id identifier rubyid_parallel_opts'>parallel_opts</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_resource'>resource</span><span class='op'>|</span>
551
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Parallel</span><span class='op'>::</span><span class='const'>Break</span> <span class='kw'>if</span> <span class='id identifier rubyid_stopped?'>stopped?</span>
552
+ <span class='id identifier rubyid_events'>events</span> <span class='op'>=</span> <span class='kw'>nil</span>
553
+ <span class='kw'>begin</span>
554
+ <span class='ivar'>@connection_pool</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_connection'>connection</span><span class='op'>|</span>
555
+ <span class='id identifier rubyid_monitor'>monitor</span> <span class='op'>=</span> <span class='id identifier rubyid_monitor_class'>monitor_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='comma'>,</span> <span class='id identifier rubyid_resource'>resource</span><span class='rparen'>)</span>
556
+ <span class='id identifier rubyid_monitor'>monitor</span><span class='period'>.</span><span class='id identifier rubyid_process'>process</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__events'>_events</span><span class='op'>|</span>
557
+ <span class='id identifier rubyid_events'>events</span> <span class='op'>=</span> <span class='id identifier rubyid__events'>_events</span>
558
+ <span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>send_messages:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_events'>events</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_hash</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
559
+ <span class='ivar'>@api_client_pool</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_api_client'>api_client</span><span class='op'>|</span> <span class='id identifier rubyid_api_client'>api_client</span><span class='period'>.</span><span class='id identifier rubyid_send_messages'>send_messages</span><span class='lparen'>(</span><span class='id identifier rubyid_events'>events</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
560
+ <span class='kw'>end</span>
561
+ <span class='kw'>end</span>
562
+ <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
563
+ <span class='id identifier rubyid_success_count'>success_count</span> <span class='op'>+=</span> <span class='int'>1</span>
564
+ <span class='id identifier rubyid_consecutive_error_count'>consecutive_error_count</span> <span class='op'>=</span> <span class='int'>0</span>
565
+ <span class='kw'>end</span>
566
+ <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
567
+ <span class='id identifier rubyid_log_error'>log_error</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
568
+ <span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>failed_events:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_events'>events</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_hash</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_events'>events</span>
569
+ <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
570
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>TooManyError</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_consecutive_error_count'>consecutive_error_count</span> <span class='op'>+=</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>&gt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_max_consecuitive_error_count'>max_consecuitive_error_count</span>
571
+ <span class='kw'>end</span>
572
+ <span class='kw'>end</span>
573
+ <span class='kw'>end</span>
574
+ <span class='id identifier rubyid_success_count'>success_count</span>
575
+ <span class='kw'>end</span></pre>
576
+ </td>
577
+ </tr>
578
+ </table>
579
+ </div>
580
+
581
+ <div class="method_details ">
582
+ <h3 class="signature " id="total_count-instance_method">
583
+
584
+ #<strong>total_count</strong> &#x21d2; <tt>Object</tt>
585
+
586
+
587
+
588
+
589
+
590
+ </h3><table class="source_code">
591
+ <tr>
592
+ <td>
593
+ <pre class="lines">
594
+
595
+
596
+ 63
597
+ 64
598
+ 65</pre>
599
+ </td>
600
+ <td>
601
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/processor.rb', line 63</span>
602
+
603
+ <span class='kw'>def</span> <span class='id identifier rubyid_total_count'>total_count</span>
604
+ <span class='id identifier rubyid_resources'>resources</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
605
+ <span class='kw'>end</span></pre>
606
+ </td>
607
+ </tr>
608
+ </table>
609
+ </div>
610
+
611
+ </div>
612
+
613
+ </div>
614
+
615
+ <div id="footer">
616
+ Generated on Thu Feb 23 23:20:34 2017 by
617
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
618
+ 0.9.5 (ruby-2.3.2).
619
+ </div>
620
+
621
+ </div>
622
+ </body>
623
+ </html>