qless 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/bin/install_phantomjs +7 -0
  2. data/lib/qless.rb +4 -0
  3. data/lib/qless/job.rb +40 -38
  4. data/lib/qless/qless-core/cancel.lua +9 -9
  5. data/lib/qless/qless-core/failed.lua +1 -1
  6. data/lib/qless/qless-core/peek.lua +22 -12
  7. data/lib/qless/qless-core/pop.lua +31 -16
  8. data/lib/qless/qless-core/recur.lua +12 -3
  9. data/lib/qless/server.rb +96 -66
  10. data/lib/qless/server/static/css/bootstrap-responsive.css +686 -0
  11. data/lib/qless/server/static/css/bootstrap-responsive.min.css +12 -0
  12. data/lib/qless/server/static/css/bootstrap.css +3991 -0
  13. data/lib/qless/server/static/css/bootstrap.min.css +689 -0
  14. data/lib/qless/server/static/css/codemirror.css +112 -0
  15. data/lib/qless/server/static/css/docs.css +819 -0
  16. data/lib/qless/server/static/css/jquery.noty.css +105 -0
  17. data/lib/qless/server/static/css/noty_theme_twitter.css +137 -0
  18. data/lib/qless/server/static/css/style.css +204 -0
  19. data/lib/qless/server/static/favicon.ico +0 -0
  20. data/lib/qless/server/static/img/glyphicons-halflings-white.png +0 -0
  21. data/lib/qless/server/static/img/glyphicons-halflings.png +0 -0
  22. data/lib/qless/server/static/js/bootstrap-alert.js +94 -0
  23. data/lib/qless/server/static/js/bootstrap-scrollspy.js +125 -0
  24. data/lib/qless/server/static/js/bootstrap-tab.js +130 -0
  25. data/lib/qless/server/static/js/bootstrap-tooltip.js +270 -0
  26. data/lib/qless/server/static/js/bootstrap-typeahead.js +285 -0
  27. data/lib/qless/server/static/js/bootstrap.js +1726 -0
  28. data/lib/qless/server/static/js/bootstrap.min.js +6 -0
  29. data/lib/qless/server/static/js/codemirror.js +2972 -0
  30. data/lib/qless/server/static/js/jquery.noty.js +220 -0
  31. data/lib/qless/server/static/js/mode/javascript.js +360 -0
  32. data/lib/qless/server/static/js/theme/cobalt.css +18 -0
  33. data/lib/qless/server/static/js/theme/eclipse.css +25 -0
  34. data/lib/qless/server/static/js/theme/elegant.css +10 -0
  35. data/lib/qless/server/static/js/theme/lesser-dark.css +45 -0
  36. data/lib/qless/server/static/js/theme/monokai.css +28 -0
  37. data/lib/qless/server/static/js/theme/neat.css +9 -0
  38. data/lib/qless/server/static/js/theme/night.css +21 -0
  39. data/lib/qless/server/static/js/theme/rubyblue.css +21 -0
  40. data/lib/qless/server/static/js/theme/xq-dark.css +46 -0
  41. data/lib/qless/server/views/_job.erb +219 -0
  42. data/lib/qless/server/views/_job_list.erb +8 -0
  43. data/lib/qless/server/views/_pagination.erb +7 -0
  44. data/lib/qless/server/views/about.erb +130 -0
  45. data/lib/qless/server/views/config.erb +14 -0
  46. data/lib/qless/server/views/failed.erb +48 -0
  47. data/lib/qless/server/views/failed_type.erb +18 -0
  48. data/lib/qless/server/views/job.erb +17 -0
  49. data/lib/qless/server/views/layout.erb +341 -0
  50. data/lib/qless/server/views/overview.erb +90 -0
  51. data/lib/qless/server/views/queue.erb +122 -0
  52. data/lib/qless/server/views/queues.erb +26 -0
  53. data/lib/qless/server/views/tag.erb +6 -0
  54. data/lib/qless/server/views/track.erb +69 -0
  55. data/lib/qless/server/views/worker.erb +34 -0
  56. data/lib/qless/server/views/workers.erb +14 -0
  57. data/lib/qless/version.rb +1 -1
  58. data/lib/qless/worker.rb +11 -2
  59. metadata +72 -6
  60. data/lib/qless/qless-core/ruby/lib/qless-core.rb +0 -1
  61. data/lib/qless/qless-core/ruby/lib/qless/core.rb +0 -13
  62. data/lib/qless/qless-core/ruby/lib/qless/core/version.rb +0 -5
  63. data/lib/qless/qless-core/ruby/spec/qless_core_spec.rb +0 -13
@@ -0,0 +1,105 @@
1
+
2
+ /* CORE STYLES */
3
+
4
+ /* noty bar */
5
+ .noty_bar {
6
+ position: fixed;
7
+ display: none;
8
+ z-index: 9999999;
9
+ }
10
+
11
+ /* noty_message */
12
+ .noty_bar .noty_message {
13
+ text-align: center;
14
+ }
15
+
16
+ /* noty close button */
17
+ .noty_bar .noty_close {
18
+ cursor: pointer;
19
+ }
20
+
21
+ /* noty modal */
22
+ .noty_modal {
23
+ position: fixed;
24
+ width: 100%;
25
+ height: 100%;
26
+ background-color: #000;
27
+ z-index: 10000;
28
+ opacity: 0.6;
29
+ display: none;
30
+ left: 0;
31
+ top: 0;
32
+ }
33
+
34
+ /* noty container for noty_layout_topLeft & noty_layout_topRight */
35
+ ul.noty_cont {
36
+ position: fixed;
37
+ z-index: 10000000;
38
+ margin: 0px;
39
+ padding: 0px;
40
+ list-style: none;
41
+ width: 300px;
42
+ }
43
+ ul.noty_cont li {
44
+ position: relative;
45
+ float: left;
46
+ clear: both;
47
+ list-style: none;
48
+ padding: 0px;
49
+ margin: 10px 0 0 0;
50
+ width: 300px; /* Fix for: http://bugs.jquery.com/ticket/2278 */
51
+ }
52
+ ul.noty_cont.noty_layout_topLeft {left:20px; top:20px;}
53
+ ul.noty_cont.noty_layout_topRight {right:40px; top:20px;}
54
+ ul.noty_cont.noty_layout_bottomLeft {left:20px; bottom:20px}
55
+ ul.noty_cont.noty_layout_bottomRight {right:40px; bottom:20px}
56
+ ul.noty_cont.noty_layout_topRight li {float:right}
57
+
58
+ /* LAYOUTS */
59
+
60
+ /* noty_layout_top */
61
+ .noty_bar.noty_layout_top {
62
+ top: 0;
63
+ left: 0;
64
+ width: 100%;
65
+ -webkit-border-radius: 0px;
66
+ -moz-border-radius: 0px;
67
+ border-radius: 0px;
68
+ }
69
+
70
+ /* noty_layout_bottom */
71
+ .noty_bar.noty_layout_bottom {
72
+ bottom: 0;
73
+ left: 0;
74
+ width: 100%;
75
+ -webkit-border-radius: 0px;
76
+ -moz-border-radius: 0px;
77
+ border-radius: 0px;
78
+ }
79
+
80
+ /* noty_layout_center */
81
+ .noty_bar.noty_layout_center {
82
+ top: 40%;
83
+ }
84
+
85
+ /* noty_layout_topLeft & noty_layout_topRight */
86
+ .noty_bar.noty_layout_topLeft,
87
+ .noty_bar.noty_layout_topRight,
88
+ .noty_bar.noty_layout_bottomLeft,
89
+ .noty_bar.noty_layout_bottomRight {
90
+ width: 100%;
91
+ clear: both;
92
+ position: relative;
93
+ }
94
+
95
+ .noty_bar.noty_layout_topLeft .noty_message,
96
+ .noty_bar.noty_layout_topRight .noty_message,
97
+ .noty_bar.noty_layout_bottomLeft .noty_message,
98
+ .noty_bar.noty_layout_bottomRight .noty_message {
99
+ text-align: left;
100
+ }
101
+
102
+ /* noty_layout_topCenter */
103
+ .noty_bar.noty_layout_topCenter {
104
+ top: 20px;
105
+ }
@@ -0,0 +1,137 @@
1
+
2
+ /* CORE STYLES*/
3
+
4
+ /* noty bar */
5
+ .noty_bar.noty_theme_twitter {
6
+ font-size: 13px;
7
+ line-height: 18px;
8
+ text-shadow: 0 1px 0 #fff;
9
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
10
+ }
11
+
12
+ /* custom container */
13
+ .noty_custom_container.noty_theme_twitter.noty_layout_inline {
14
+ position: relative;
15
+ }
16
+
17
+ /* custom growl container */
18
+ .noty_custom_container.noty_theme_twitter.noty_layout_inline .noty_cont.noty_layout_inline {
19
+ position: static;
20
+ }
21
+ /* custom noty bar */
22
+ .noty_custom_container.noty_theme_twitter.noty_layout_inline .noty_bar {
23
+ position: static;
24
+ }
25
+ .noty_custom_container.noty_theme_twitter.noty_layout_inline .noty_bar .noty_message {
26
+ font-size: 13px;
27
+ padding: 4px;
28
+ }
29
+ .noty_custom_container.noty_theme_twitter.noty_layout_inline .noty_bar .noty_message .noty_buttons {
30
+ margin-top: -1px;
31
+ }
32
+
33
+ /* noty_message */
34
+ .noty_bar.noty_theme_twitter .noty_message {
35
+ padding: 8px 14px;
36
+ }
37
+ /* noty_has_close_button */
38
+ .noty_bar.noty_theme_twitter.noty_closable .noty_message {
39
+ padding: 8px 35px 8px 14px;
40
+ }
41
+
42
+ /* noty_buttons */
43
+ .noty_bar.noty_theme_twitter .noty_message .noty_buttons {
44
+ float: right;
45
+ margin-top: -5px;
46
+ margin-left: 4px;
47
+ }
48
+
49
+ /* noty_button */
50
+ .noty_bar.noty_theme_twitter .noty_message .noty_buttons button {
51
+ margin-left: 5px;
52
+ }
53
+
54
+ /* noty close button */
55
+ .noty_bar.noty_theme_twitter .noty_close {
56
+ position: absolute;
57
+ top: 7px;
58
+ right: 16px;
59
+ font-size: 18px;
60
+ line-height: 18px;
61
+ font-weight: bold;
62
+ color: #000;
63
+ opacity: 0.2;
64
+ text-shadow: 0 1px 0 #fff;
65
+ }
66
+
67
+ /* noty close button hover */
68
+ .noty_bar.noty_theme_twitter .noty_close:hover {
69
+ opacity: 0.4;
70
+ }
71
+
72
+ .noty_bar.noty_theme_twitter .noty_close:after {
73
+ content: "x";
74
+ }
75
+
76
+ /* noty modal */
77
+ .noty_modal.noty_theme_twitter {
78
+ opacity: 0.7;
79
+ }
80
+
81
+ /* LAYOUTS */
82
+
83
+ /* noty_layout_topLeft & noty_layout_topRight */
84
+ .noty_bar.noty_theme_twitter.noty_layout_center,
85
+ .noty_bar.noty_theme_twitter.noty_layout_topCenter,
86
+ .noty_bar.noty_theme_twitter.noty_layout_topLeft,
87
+ .noty_bar.noty_theme_twitter.noty_layout_topRight,
88
+ .noty_bar.noty_theme_twitter.noty_layout_bottomLeft,
89
+ .noty_bar.noty_theme_twitter.noty_layout_bottomRight {
90
+ -webkit-border-radius: 4px;
91
+ -moz-border-radius: 4px;
92
+ border-radius: 4px;
93
+ }
94
+ .noty_bar.noty_theme_twitter.noty_layout_topLeft .noty_message .noty_buttons,
95
+ .noty_bar.noty_theme_twitter.noty_layout_topRight .noty_message .noty_buttons,
96
+ .noty_bar.noty_theme_twitter.noty_layout_bottomLeft .noty_message .noty_buttons,
97
+ .noty_bar.noty_theme_twitter.noty_layout_bottomRight .noty_message .noty_buttons {
98
+ float: none;
99
+ border-top: 1px solid #FBEED5;
100
+ margin-left: 0;
101
+ margin-top: 10px;
102
+ padding-top: 10px;
103
+ text-align: right;
104
+ }
105
+
106
+ .noty_bar.noty_theme_twitter.noty_layout_center .noty_message .noty_buttons,
107
+ .noty_bar.noty_theme_twitter.noty_layout_topCenter .noty_message .noty_buttons {
108
+ margin-left: 15px;
109
+ margin-top: -2px
110
+ }
111
+
112
+ /* NOTIFICATION TYPES */
113
+
114
+ /* noty_alert */
115
+ .noty_bar.noty_theme_twitter.noty_alert {
116
+ background-color: #FCF8E3;
117
+ border: 1px solid #FBEED5;
118
+ color: #C09853;
119
+ }
120
+ /* noty_error */
121
+ .noty_bar.noty_theme_twitter.noty_error {
122
+ background-color: #F2DEDE;
123
+ border: 1px solid #EED3D7;
124
+ color: #B94A48;
125
+ }
126
+ /* noty_success */
127
+ .noty_bar.noty_theme_twitter.noty_success {
128
+ background-color: #DFF0D8;
129
+ border: 1px solid #D6E9C6;
130
+ color: #468847;
131
+ }
132
+ /* noty_information */
133
+ .noty_bar.noty_theme_twitter.noty_information {
134
+ background-color: #D9EDF7;
135
+ border: 1px solid #BCE8F1;
136
+ color: #3A87AD;
137
+ }
@@ -0,0 +1,204 @@
1
+ /* @override http://localhost:4567/css/style.css */
2
+
3
+ /* Shamelessly poached from resque
4
+ SEOmoz Blue: #4d87e2;
5
+ */
6
+
7
+ .queue-name {
8
+ font-size: 25px;
9
+ font-weight: bold;
10
+ }
11
+
12
+ .queue-summary {
13
+ font-size: 20px;
14
+ }
15
+
16
+ .queue-summary-description {
17
+ font-size: 12px;
18
+ color: lightgrey;
19
+ }
20
+
21
+ .queue-stats {
22
+ margin-top: 10px;
23
+ }
24
+
25
+ .queue-stats-date {}
26
+ .queue-stats-failures {}
27
+ .queue-stats-time {}
28
+ .queue-stats-wait {}
29
+
30
+ .queue-stats-time-title {
31
+ font-size: 20px;
32
+ width: 100%;
33
+ text-align: center;
34
+ margin-bottom: 10px;
35
+ margin-top: 10px;
36
+ }
37
+
38
+ .queue-stats-time-summary {
39
+ text-align: center;
40
+ }
41
+
42
+ .queue-stats-time-histogram-wait {}
43
+ .queue-stats-time-histogram-run {}
44
+
45
+ .job-id {
46
+ float: left;
47
+ font-size: 20px;
48
+ font-weight: bold;
49
+ padding-bottom: 10px;
50
+ }
51
+
52
+ .job-priority {
53
+ font-size: 16px;
54
+ padding-left: 5px;
55
+ }
56
+
57
+ .button {
58
+ background-color: darkgray;
59
+ float: left;
60
+ -webkit-border-radius: 5px;
61
+ -moz-border-radius: 5px;
62
+ border-radius: 5px;
63
+ color: white;
64
+ font-weight: bold;
65
+ padding-top: 2px;
66
+ padding-left: 7px;
67
+ padding-right: 7px;
68
+ padding-bottom: 3px;
69
+ margin-left: 5px;
70
+
71
+ }
72
+
73
+ .cancel-button {
74
+ background-color: red;
75
+ }
76
+
77
+ .job-tags {
78
+ clear: both;
79
+ margin-left: 15px;
80
+ }
81
+
82
+ .job-tag {
83
+ border: none;
84
+ -webkit-border-radius: 15px;
85
+ -moz-border-radius: 15px;
86
+ border-radius: 15px;
87
+ padding-left: 10px;
88
+ padding-right: 10px;
89
+ }
90
+
91
+ .job-summary-container > .job-tags {
92
+ float: left;
93
+ clear: none;
94
+ margin-top: 1px;
95
+ }
96
+
97
+ .job-summary-container > .job-summary {
98
+ float: left;
99
+ clear: none;
100
+ margin-top: -7px;
101
+ padding-left: 12px;
102
+ }
103
+
104
+ .job-summary {
105
+ clear: both;
106
+ padding-top: 10px;
107
+ font-size: 16px;
108
+ }
109
+
110
+ .job-state, .job-queue, .job-worker {
111
+ font-weight: bold;
112
+ }
113
+
114
+ .job-data-container {
115
+ margin-top: 10px;
116
+ border: 2px solid black;
117
+ }
118
+
119
+ html { background:#efefef; font-family:Arial, Verdana, sans-serif; font-size:13px; }
120
+ body { padding:0; margin:0; }
121
+
122
+ .header { background:#000; padding:8px 5% 0 5%; border-bottom:1px solid #444;border-bottom:5px solid #4d87e2;}
123
+ .header h1 { color:#333; font-size:90%; font-weight:bold; margin-bottom:6px;}
124
+ .header ul li { display:inline;}
125
+ .header ul li a { color:#fff; text-decoration:none; margin-right:10px; display:inline-block; padding:8px; -webkit-border-top-right-radius:6px; -webkit-border-top-left-radius:6px; -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; }
126
+ .header ul li a:hover { background:#333;}
127
+ .header ul li.current a { background:#ce1212; font-weight:bold; color:#fff;}
128
+
129
+ .header .namespace { position: absolute; right: 75px; top: 10px; color: #7A7A7A; }
130
+
131
+ .subnav { padding:2px 5% 7px 5%; background:#ce1212; font-size:90%;}
132
+ .subnav li { display:inline;}
133
+ .subnav li a { color:#fff; text-decoration:none; margin-right:10px; display:inline-block; background:#dd5b5b; padding:5px; -webkit-border-radius:3px; -moz-border-radius:3px;}
134
+ .subnav li.current a { background:#fff; font-weight:bold; color:#ce1212;}
135
+ .subnav li a:active { background:#b00909;}
136
+
137
+ #main { padding:10px 5%; background:#fff; overflow:hidden; }
138
+ #main .logo { float:right; margin:10px;}
139
+ #main span.hl { background:#efefef; padding:2px;}
140
+ #main h1 { margin:10px 0; font-size:190%; font-weight:bold; color:#ce1212;}
141
+ #main h2 { margin:10px 0; font-size:130%;}
142
+ #main table { width:100%; margin:10px 0;}
143
+ #main table tr td, #main table tr th { border:1px solid #ccc; padding:6px;}
144
+ #main table tr th { background:#efefef; color:#888; font-size:80%; font-weight:bold;}
145
+ #main table tr td.no-data { text-align:center; padding:40px 0; color:#999; font-style:italic; font-size:130%;}
146
+ #main a { color:#111;}
147
+ #main p { margin:5px 0;}
148
+ #main p.intro { margin-bottom:15px; font-size:85%; color:#999; margin-top:0; line-height:1.3;}
149
+ #main h1.wi { margin-bottom:5px;}
150
+ #main p.sub { font-size:95%; color:#999;}
151
+
152
+ #main table.queues { width:40%;}
153
+ #main table.queues td.queue { font-weight:bold; width:50%;}
154
+ #main table.queues tr.failed td { border-top:2px solid; font-size:90%; }
155
+ #main table.queues tr.failure td { background:#ffecec; border-top:2px solid #d37474; font-size:90%; color:#d37474;}
156
+ #main table.queues tr.failure td a{ color:#d37474;}
157
+
158
+ #main table.jobs td.class { font-family:Monaco, "Courier New", monospace; font-size:90%; width:50%;}
159
+ #main table.jobs td.args{ width:50%;}
160
+
161
+ #main table.workers td.icon {width:1%; background:#efefef;text-align:center;}
162
+ #main table.workers td.icon img { height: 16px; width: 16px; }
163
+ #main table.workers td.where { width:25%;}
164
+ #main table.workers td.queues { width:35%;}
165
+ #main .queue-tag { background:#b1d2e9; padding:2px; margin:0 3px; font-size:80%; text-decoration:none; text-transform:uppercase; font-weight:bold; color:#3274a2; -webkit-border-radius:4px; -moz-border-radius:4px;}
166
+ #main table.workers td.queues.queue { width:10%;}
167
+ #main table.workers td.process { width:35%;}
168
+ #main table.workers td.process span.waiting { color:#999; font-size:90%;}
169
+ #main table.workers td.process small { font-size:80%; margin-left:5px;}
170
+ #main table.workers td.process code { font-family:Monaco, "Courier New", monospace; font-size:90%;}
171
+ #main table.workers td.process small a { color:#999;}
172
+ #main.polling table.workers tr.working td { background:#f4ffe4; color:#7ac312;}
173
+ #main.polling table.workers tr.working td.where a { color:#7ac312;}
174
+ #main.polling table.workers tr.working td.process code { font-weight:bold;}
175
+
176
+
177
+ #main table.stats th { font-size:100%; width:40%; color:#000;}
178
+ #main hr { border:0; border-top:5px solid #efefef; margin:15px 0;}
179
+
180
+ #footer { padding:10px 5%; background:#efefef; color:#999; font-size:85%; line-height:1.5; border-top:5px solid #ccc; padding-top:10px;}
181
+ #footer p a { color:#999;}
182
+
183
+ #main p.poll { background:url(poll.png) no-repeat 0 2px; padding:3px 0; padding-left:23px; float:right; font-size:85%; }
184
+
185
+ #main ul.failed {}
186
+ #main ul.failed li {background:-webkit-gradient(linear, left top, left bottom, from(#efefef), to(#fff)) #efefef; margin-top:10px; padding:10px; overflow:hidden; -webkit-border-radius:5px; border:1px solid #ccc; }
187
+ #main ul.failed li dl dt {font-size:80%; color:#999; width:60px; float:left; padding-top:1px; text-align:right;}
188
+ #main ul.failed li dl dd {margin-bottom:10px; margin-left:70px;}
189
+ #main ul.failed li dl dd .retried { float:right; text-align: right; }
190
+ #main ul.failed li dl dd .retried .remove { display:none; margin-top: 8px; }
191
+ #main ul.failed li.hover dl dd .retried .remove { display:block; }
192
+ #main ul.failed li dl dd .controls { display:none; float:right; }
193
+ #main ul.failed li.hover dl dd .controls { display:block; }
194
+ #main ul.failed li dl dd code, #main ul.failed li dl dd pre { font-family:Monaco, "Courier New", monospace; font-size:90%; white-space: pre-wrap;}
195
+ #main ul.failed li dl dd.error a {font-family:Monaco, "Courier New", monospace; font-size:90%; }
196
+ #main ul.failed li dl dd.error pre { margin-top:3px; line-height:1.3;}
197
+
198
+ #main p.pagination { background:#efefef; padding:10px; overflow:hidden;}
199
+ #main p.pagination a.less { float:left;}
200
+ #main p.pagination a.more { float:right;}
201
+
202
+ #main form {float:right; margin-top:-10px;margin-left:10px;}
203
+
204
+ #main .time a.toggle_format {text-decoration:none;}