mutx 0.1.20 → 0.1.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67fc69b4cfd841b36178b1e506a20f3d03cd9a9d
4
- data.tar.gz: ad68de31196ee535480873c63e0bb35f750ab0ce
3
+ metadata.gz: 2eea47d719d99a3873e18d5c8e9b0198c362ebff
4
+ data.tar.gz: a00f9020bf79f984a8890a9ab5f14c2a16f520cb
5
5
  SHA512:
6
- metadata.gz: c4c1e280a9b936d57a226c46ba89afb3511b62b481730b8fe897b2cdd6e69e6f6651ad5691a1528da7f27515e2f0afbedf1c24002305ac7b4992a71ebb28951c
7
- data.tar.gz: b97e35dfa9340855b6de0764ee8b3cd0276e1709a9282840d9f8346870cbb6dcef8580145a7ca642dfaedea09dd275a11c42b1fe641269e270663d98cf1a9d96
6
+ metadata.gz: 6fac18eb28aa45098c15efbc1dadd0ca81a066869954c6bdb83ea34fa1e26060a241adf02b24b91ae2d93051d0332a6c4bec0c7c2da57618b9756fd27b4f3610
7
+ data.tar.gz: 55b29711516ac9decbc127d14c7499d8330035615a53f42ed9d8fd7fa62a9c0c436fc2cc7224dcf872ba419961f9372c380bc90f51c64d9e0369ae95788e47b8
Binary file
@@ -126,6 +126,10 @@ module Mutx
126
126
  template "cron.rb.tt", "#{Dir.pwd}/mutx/cron/cron.rb" unless File.exist? "#{Dir.pwd}/mutx/cron/cron.rb"
127
127
  end
128
128
 
129
+ def copy_mutx_restart
130
+ template "restart.rb.tt", "#{Dir.pwd}/mutx/restart.rb" unless File.exist? "#{Dir.pwd}/mutx/restart.rb"
131
+ end
132
+
129
133
  def copy_mutx_templates
130
134
  dir = "#{Dir.pwd}"
131
135
  template "mutx_template.html.erb.zip", "#{Dir.pwd}/mutx/templates/mutx_template.html.erb.zip" unless File.exist? "#{Dir.pwd}/mutx/templates/mutx_template.html.erb.zip"
@@ -16,6 +16,7 @@ module Cron
16
16
  Mutx::API::Execution.start task_name, query_string
17
17
  end
18
18
  end
19
+ Mutx::Database::MongoConnector.force_close
19
20
  end
20
21
  end#class
21
22
  end#module
@@ -1,47 +1,16 @@
1
- <html>
2
- <tbody>
3
- <img src="https://raw.githubusercontent.com/romanrod/mutx/master/img/mutx_logo.png" alt="MuTX" border="0" width="100%" style="display:block;margin:0 auto;border:0;max-width:150px;min-height:auto;outline:0" class="CToWUd"></a></td></tr>
4
- <tr>
5
- <td align="left" style="font-size:10px;border-bottom:1px solid #e5e5e5">&nbsp;</td>
6
- </tr>
7
- </tbody>
8
- <tr>
9
- <td height="1" align="center" bgcolor="#ffffff" style="font-size:1px"><img src="https://ci4.googleusercontent.com/proxy/mX95orir-khAa9968ZvaEUFjay-YQnjjfRzI5YJXNG30xvJECdmEqqDPUE4KChEE5CsA-0xr-URW-1rIGpQFhhTosSDZj4LQ_ktxrrYjsrJXrntn8L8oOIU=s0-d-e1-ft#http://app2.dopplerfiles.net/Users/3778/Campaigns/8930766/520x1.png" width="100%" height="1" alt="" style="display:block" border="0" class="CToWUd"></td>
10
- </tr>
11
- <div class='container'>
12
- <br>
13
- <div class='well'>
14
- <h3 style='color:Black; font-size: 12px;'><b>Result for:</b>'<%= task_name %>' execution </h3>
15
- <h6 style='color:Black; font-size: 12px;'><b>Result ID:</b>'<%= id %>'</h6>
16
- <h6 style='color:Black; font-size: 12px;'><b>Status:</b>'<%= status %>'</h6>
17
- <h6 style='color:Black; font-size: 12px;'><b>Duration:</b>'<%= time %>' seconds</h6>
18
- <h6 style='color:Black; font-size: 12px;'><b>Summary:</b>'<%= info %>'
19
- <br>
20
- <br>
21
- <h3 style='color:Grey; font-size: 13px;'><b>The execution output is attached</b></h3>
22
- <h6>&nbsp;</h6>
23
- </div>
24
- <tr>
25
- <td class="legacy-container-width" height="100" valign="top" align="left" bgcolor="#FFFFFF">
26
- <table width="580" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#FFFFFF" class="legacy-container legacy-container-width">
27
- <tr>
28
- <td width="0%" height="100" valign="top" align="left" bgcolor="#FFFFFF"></td>
29
- <td width="100%" height="100" valign="top" align="left" bgcolor="#FFFFFF">
30
- <!-- Beggin Legacy Content -->
31
- <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#FFFFFF">
32
- <tr><td width="100%" height="10" valign="top"></td></tr>
33
- <tr>
34
- <td width="100%" valign="top" bgcolor="#FFFFFF" style="font-family: sans-serif; font-size: 15px; line-height: 16px; color: #d22222; text-align: center;">
35
- This email is sent automatically. Please, do not reply
36
- </td>
37
- </tr>
38
- <tr><td width="100%" height="10" valign="top"></td></tr>
39
- </table>
40
- <!-- End Legacy Content -->
41
- </td>
42
- <td width="0%" height="100" valign="top" align="left" bgcolor="#FFFFFF"></td>
43
- </tr>
44
- </table>
45
- </td>
46
- </tr>
47
- </html>
1
+ <div><img class="CToWUd" style="margin-top: 0px; margin-bottom: 0px; border: 0px; max-width: 150px; min-height: auto; outline: 0px; float: left;" src="https://raw.githubusercontent.com/romanrod/mutx/master/img/mutx_logo.png" alt="MuTX" width="43" height="43" border="0" /></div>
2
+ <p>&nbsp;<img class="CToWUd" style="display: block;" src="https://ci4.googleusercontent.com/proxy/mX95orir-khAa9968ZvaEUFjay-YQnjjfRzI5YJXNG30xvJECdmEqqDPUE4KChEE5CsA-0xr-URW-1rIGpQFhhTosSDZj4LQ_ktxrrYjsrJXrntn8L8oOIU=s0-d-e1-ft#http://app2.dopplerfiles.net/Users/3778/Campaigns/8930766/520x1.png" alt="" width="100%" height="1" border="0" /></p>
3
+ <div>
4
+ <div class="container">
5
+ <div class="well">
6
+ <p style="color: black; font-size: 12px;">&lt;%= task_name %&gt;'&nbsp;finished</p>
7
+ <p style="color: black; font-size: 12px;"><strong>Summary:&nbsp;</strong>&lt;%= info %&gt;</p>
8
+ <p style="color: black; font-size: 12px;"><strong>Duration:&nbsp;</strong>&lt;%= time %&gt; seconds&nbsp;</p>
9
+ <p style="color: black; font-size: 12px;"><strong><strong>Status: </strong></strong>&lt;%= status %&gt;</p>
10
+ <p style="color: black; font-size: 12px;"><strong>Result ID: </strong>&lt;%= id %&gt;</p>
11
+ <p style="color: black; font-size: 12px;"><strong>Execution name:</strong> &lt;%= execution_name %&gt;</p>
12
+ <p style="color: black; font-size: 12px;"><span style="color: #ff0000;"><strong>The execution output is attached</strong></span></p>
13
+ <h6>&nbsp;This email is sent automatically. Please, do not reply</h6>
14
+ </div>
15
+ </div>
16
+ </div>
@@ -1,27 +1,21 @@
1
- <html>
2
- <tbody>
3
- <img src="https://raw.githubusercontent.com/romanrod/mutx/master/img/mutx_logo.png" alt="MuTX" border="0" width="100%" style="display:block;margin:0 auto;border:0;max-width:150px;min-height:auto;outline:0" class="CToWUd"></a></td></tr>
4
- <tr>
5
- <td align="left" style="font-size:10px;border-bottom:1px solid #e5e5e5">&nbsp;</td>
6
- </tr>
7
- </tbody>
8
- <tr>
9
- <td height="1" align="center" bgcolor="#ffffff" style="font-size:1px"><img src="https://ci4.googleusercontent.com/proxy/mX95orir-khAa9968ZvaEUFjay-YQnjjfRzI5YJXNG30xvJECdmEqqDPUE4KChEE5CsA-0xr-URW-1rIGpQFhhTosSDZj4LQ_ktxrrYjsrJXrntn8L8oOIU=s0-d-e1-ft#http://app2.dopplerfiles.net/Users/3778/Campaigns/8930766/520x1.png" width="100%" height="1" alt="" style="display:block" border="0" class="CToWUd"></td>
10
- </tr>
11
- <div class='container'>
12
- <br>
13
- <div class='well'>
14
- <h3 style='color:Black; font-size: 12px;'>Result for:<b style='color:Red; font-size: 13px;'>' <%= task_name %>'</b> execution </h3>
15
- <h6 style='color:Black; font-size: 12px;'><b>Result ID:</b><b style='color:Red; font-size: 13px;'> '<%= id %>'</b></h6>
16
- <h6 style='color:Black; font-size: 12px;'><b>Status:</b><b style='color:Red; font-size: 13px;'> '<%= status %></b></b>'</h6>
17
- <h6 style='color:Black; font-size: 12px;'><b>Duration:</b><b style='color:Red; font-size: 13px;'> '<%= time %>'</b> seconds</h6>
18
- <h6>&nbsp;</h6>
19
- </div>
20
- <h3>
21
- <medium>
22
- <pre style="height:400px; white-space:pre; word-wrap:normal;">
23
- <b style='color:Black; font-size: 15px;'><%= output %></b>
24
- </pre>
25
- </medium>
26
- </h3>
27
- </html>
1
+ <div>
2
+ <div><img class="CToWUd" style="margin-top: 0px; margin-bottom: 0px; border: 0px; max-width: 150px; min-height: auto; outline: 0px; float: left;" src="https://raw.githubusercontent.com/romanrod/mutx/master/img/mutx_logo.png" alt="MuTX" width="43" height="43" border="0" /></div>
3
+ </div>
4
+ <div>
5
+ <p>&nbsp;<img class="CToWUd" style="display: block;" src="https://ci4.googleusercontent.com/proxy/mX95orir-khAa9968ZvaEUFjay-YQnjjfRzI5YJXNG30xvJECdmEqqDPUE4KChEE5CsA-0xr-URW-1rIGpQFhhTosSDZj4LQ_ktxrrYjsrJXrntn8L8oOIU=s0-d-e1-ft#http://app2.dopplerfiles.net/Users/3778/Campaigns/8930766/520x1.png" alt="" width="100%" height="1" border="0" /></p>
6
+ </div>
7
+ <div>
8
+ <div class="container">
9
+ <div class="well">
10
+ <p style="color: black; font-size: 12px;"><strong>&lt;%= task_name %&gt;</strong> finished</p>
11
+ <p style="color: black; font-size: 12px;"><strong>Duration:&nbsp;</strong>&lt;%= time %&gt; seconds&nbsp;</p>
12
+ <p style="color: black; font-size: 12px;"><strong><strong>Status: </strong></strong>&lt;%= status %&gt;</p>
13
+ <p style="color: black; font-size: 12px;"><strong>Result ID: </strong>&lt;%= id %&gt;</p>
14
+ <p style="color: black; font-size: 12px;"><strong>Execution name:</strong> &lt;%= execution_name %&gt;</p>
15
+ <p style="color: black; font-size: 12px;"><strong>Output</strong></p>
16
+ <p style="color: black; font-size: 12px;">&lt;%= output %&gt;</p>
17
+ <h4>&nbsp;<span style="color: #ff0000;">This email is sent automatically. Please, do not reply</span></h4>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ <div>&nbsp;</div>
@@ -0,0 +1,23 @@
1
+ require 'mutx'
2
+ require 'byebug'
3
+
4
+ module Cron
5
+ class Server
6
+
7
+ def self.restart
8
+ running_task = []
9
+ running_task = Mutx::Database::MongoConnector.running_now
10
+
11
+ if running_task.eql? []
12
+ Mutx::Support::Console.execute "cd /home/ubuntu/garba-automation && mutx restart"
13
+ else
14
+ puts
15
+ puts "Tasks running right now, cant restart"
16
+ puts
17
+ end
18
+ Mutx::Database::MongoConnector.force_close
19
+ end
20
+ end#class
21
+ end#module
22
+
23
+ Cron::Server.restart
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -299,7 +299,6 @@ executables:
299
299
  extensions: []
300
300
  extra_rdoc_files: []
301
301
  files:
302
- - ".DS_Store"
303
302
  - ".gitignore"
304
303
  - Gemfile
305
304
  - LICENSE.txt
@@ -314,6 +313,7 @@ files:
314
313
  - documentation/link.md
315
314
  - documentation/results.md
316
315
  - documentation/start.md
316
+ - favicon.ico
317
317
  - img/mutx_logo.png
318
318
  - img/mutx_logo.svg
319
319
  - lib/.DS_Store
@@ -331,6 +331,7 @@ files:
331
331
  - lib/generators/templates/mutx_body_template.html.erb.zip
332
332
  - lib/generators/templates/mutx_template.html.erb
333
333
  - lib/generators/templates/mutx_template.html.erb.zip
334
+ - lib/generators/templates/restart.rb.tt
334
335
  - lib/generators/templates/sidekiq.log.tt
335
336
  - lib/generators/templates/tasks.mutx.tt
336
337
  - lib/generators/templates/unicorn.rb.tt