delayed-web 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/delayed/web/application.css +8 -0
- data/app/controllers/delayed/web/jobs_controller.rb +5 -3
- data/app/views/delayed/web/jobs/index.html.erb +21 -15
- data/app/views/delayed/web/jobs/show.html.erb +16 -7
- data/app/views/layouts/delayed/web/application.html.erb +2 -2
- data/config/locales/en.yml +28 -0
- data/config/locales/fr.yml +38 -0
- data/lib/delayed/web/version.rb +1 -1
- data/spec/decorators/status_decorator_spec.rb +6 -6
- data/spec/dummy/{README.rdoc → README.md} +1 -5
- data/spec/dummy/Rakefile +2 -2
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/javascripts/application.js +4 -4
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +6 -4
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -2
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +9 -9
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +6 -1
- data/spec/dummy/bin/rake +5 -0
- data/spec/dummy/bin/setup +34 -0
- data/spec/dummy/bin/spring +16 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/config/application.rb +3 -10
- data/spec/dummy/config/boot.rb +2 -4
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/database.yml +8 -8
- data/spec/dummy/config/environment.rb +4 -4
- data/spec/dummy/config/environments/development.rb +30 -5
- data/spec/dummy/config/environments/production.rb +37 -31
- data/spec/dummy/config/environments/test.rb +10 -4
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/new_framework_defaults.rb +24 -0
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/puma.rb +47 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config.ru +2 -1
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +204 -822
- data/spec/dummy/public/404.html +20 -11
- data/spec/dummy/public/422.html +20 -11
- data/spec/dummy/public/500.html +19 -10
- data/spec/dummy/{db/development.sqlite3 → public/apple-touch-icon-precomposed.png} +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/test/test_helper.rb +10 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3C/3Cv7jqr37B61r7fqwxWvd--aHzAB16IMAayHCdzN1_g.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3P/3PKL-ltD66Q5Y9oZm0JIpPFHZf75lkBmlVbk9n7WR6I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4m/4mhHV_JRYhfjwQYZFG20cAO2Yv8z7cdZoRUlJ6owO1c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5K/5KFS8PXte6qspqZGq4Ik9agJScJc_Ys1g-ixefnltcI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6P/6PAdvLeS3DeB7LpcsFOb87bJzAYrddbvfuIAEqHxRr4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8a/8a72QeNpJHbPUCGphl4N1wW0kFxMWXllo-u2nvciz74.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8j/8jv9XEWjObSlnBUb83DYk5lPSXy9JzGTdFjKmd_pOnw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/91/91TzEwUN0SsFLD2vmfQyv29OYasnYot7CrpPBeEOX44.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/94/949JQGJfq12pGFPu4fF-q9Te6Wk7V2j7ksBgcFuUR8I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AU/AUA3gS85bXpXsnslrgEO60kZzw3QKiEvPj34pmZZG6E.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ad/AdJT67m6XBdSd7gC1pokRugFBHboZeqqq3OYQ5dYWT0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DX/DXG2b6gB-WaBv4wQGJdCQE__iNE63UVYxyNtcrAjCcU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EW/EWoZeSbkURZ54Y5Szrj-sukzpD0HjCfzr0yrIeRePvo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/G5/G5-q7OsLYbfvD0s5M7s-KRg1SJnT2UzSkK2FNC9Q5VU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gf/Gf0OYI2tDZrbozlwEYLC-iCsHnDbisQ0Y1xEY_wLHQg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gn/Gn35l7xQ2vua3ieNdDqribJzx-BEva4QVF98P0ob8ZA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K1/K1EkTPTNoxu6eLQ9AN3rQGQAbFnopRlTn0J5o445eRA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KV/KVFOaVBVhJVQbMX6IXvE_1j6DLu6yKCfbB4FxcjP6R8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P8/P8th7LiaH7S2vrLaIeLVGNk_T8iXKzaccxkFW3CQAGc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QK/QK67I6WH5soH3-BepjA7XSImEsgSqMD4zXIgLLE2JMg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QU/QUUCKuphTk6YAxxBa8_Kz0dYMxZU6P4dVIOBBaO4NMk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QU/qUbGTe7jKhaorvxbqTXqKH45QNuaVWB1vZbQEwsOiR4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rt/Rtpca6uY4Rs6zFrYCDsauwhzEs_P4gIvxIv2UMNrRxY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Z-/Z-TJQeNfTEJ8EDXao6Nxlz48PZmi_xoRWfhfnGQ0NYU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZB/ZBE8xH4uyHFRIJCj8LdXoNrTIjtnztMPZ7rcdqezogQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_a/_akHKvx-uMH9FmNErU3Vi5XcLCo7CJfh5rjcQNydnS8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aA/aAFx5TVwQU6iAk-JG8h_O5ngRr68qAsIwubnXKaIJGc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aN/aNkMF8-xMh15Ab2-7tWDMjNhj6r6XEZmP5Jdhc8eAfw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ac/acIRZ_z48FdcAOlRAylyzdhcgpuOJGM9wchBfM56JUA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/az/azfjRgUybqVDwF2ot0VTGjDu55lsxZ1KypkR4OAaBZ0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cC/cCsxPpl4UrSeT4eOvOCA1uc6Hv8O32h1FEbOT_Xyhic.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eD/eD607zCIXcfyfzbBeuX-wWEWCsXHjGZlwSLjAfIZLN0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ej/ejS4QGmrI1_b-NTpODzgZDNC1VeMqcWVUFwMmkYUJUM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fN/fN3kKJby4MjN6bpexF6d-ldfTY7mcNfMdGZcLPHQTQ0.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fQ/fQeT1Xd0PzU7h5vFqcc2dgxx0-zzNtUOQ0vxvO6p-Tw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h1/h1GU-0qeLya2pEHQgSzKD2IdYVhQLKu6VUJtByhHrZs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iY/iYCcSDP0P68F8YrSBfhw2CtXelF6ro1TBe8K38pJQmg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iq/iqzznIUPx7d7xkHjvH-OeZYqYPkQejSVuSY2OS0nt7I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ko/koHIVW7nx6NcIhPHn4z4VvmxCeqTZ3jsK0IdQJ1kcQM.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lu/lu0ZeR4Y_5i0x6PunBsAggQQ0aRHCEP5JHAYfsi-QhY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lw/lwVgPtoEth0lVl-y7I4DEbAWHOneHZIoWd-b6F-4uNI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mO/mOObwfzdWhe0bB5sTXGPgimY8gUaCeZ3156FVFXhEPU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oL/oLLF47_uZUr5PdnW7vWe5QNl6znWtaOcEWcLoaG3HLs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/od/odsKjb-ExbptlIaMkig5R2IwpYE0Xi29khsuiUpaAXs.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qs/qsTlkHl28VeA8BaZfNY_vDzzVNoADIYzzcnIHUMqElQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tF/tF9Dus_YFZMQCCuTOy40qRSzaxECyYo5TJjliTX_jCg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ta/taYjIR014qAQkTP5H0sSSDX974Xnd2isdO_7-6RnCwA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uc/uc7KL4vaO-70xczRU2iUQlCjFly9Ke-JBSGN1Cki1B4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xk/xkcbBc6Oe3RRvbySLku4lbT0q5k4EubOm2sJgtty-m4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yS/ySAKuC_inmnTJ4KWuPxtM0se8oxcbNlkMkLonCLCZyQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yt/ytXZWiu2SP7inmw-oivEai4Ge9MrBLWwOk-zNBXPW7s.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zC/zCpLCebmg1K8c35pbk4t5MWrNjY5Uqjzl-KD6XnfjR8.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zz/zzIb-k4QN9TihbTa7_ky3UStcVAeCVv4xcQuObZaZlY.cache +1 -0
- data/spec/helpers/jobs_helper_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +175 -98
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/log/development.log +0 -32486
- data/spec/dummy/tmp/cache/assets/development/sprockets/0332f562ff3e30cda56eb6010d3d4952 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/075cd664f24b531d19fa91317ef97eec +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/14530c1c82b7977b9d8c442d5954a6b1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/209d539bd215846261a8891dd525ec4a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2b6d7fa94bd05e45215f128721db34e3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/342153d354456f6627073c2b6271db5a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3c9123c2b52806585f33904c0f3111b0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4db6b13287795e859f19978360c1fd0e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5469cff1c301f3271083dfef71ab1794 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7437b83a2bf92170949593c06096d785 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8fa08b833277f69ba9c690fccd8f5702 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a44209b0d8d5c66ceeef04dacbc7cf1b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a5108c801777656bd9063abb9849ad55 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ad4f58431d190a3f58b681aa163b5979 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ae02292af637b0ca9807b59076a87282 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b6232d3fa8288b4d714ae250bf4e7acc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ba98100d11384e930583f1385f48a94b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d6e1313228ec89666a543b748171f6b6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d8f3c4e12078655828fafa63ef446a2e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e7905ee7f75f526588d5bed6996c2cde +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ea9a9e3e949584a04377ce58b2fd61b6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/14530c1c82b7977b9d8c442d5954a6b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/209d539bd215846261a8891dd525ec4a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b6d7fa94bd05e45215f128721db34e3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3c9123c2b52806585f33904c0f3111b0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4db6b13287795e859f19978360c1fd0e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7437b83a2bf92170949593c06096d785 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8fa08b833277f69ba9c690fccd8f5702 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a44209b0d8d5c66ceeef04dacbc7cf1b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ad4f58431d190a3f58b681aa163b5979 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ae02292af637b0ca9807b59076a87282 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6232d3fa8288b4d714ae250bf4e7acc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d6e1313228ec89666a543b748171f6b6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d8f3c4e12078655828fafa63ef446a2e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e7905ee7f75f526588d5bed6996c2cde +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ea9a9e3e949584a04377ce58b2fd61b6 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa85d14efbf1c6206da15004e441fee6861f9ab5
|
4
|
+
data.tar.gz: c40e89fbc4985325ef4a1461b02e9b7c5efaa9c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a7b8e47ac5f8036391e38ebbe3c3fcfc636916d799fab0f359e115de36a8538db6956cbddd4738a9477ae0b20d80c8c9479c201e879f9e12b1a72808cb0354a
|
7
|
+
data.tar.gz: cf7c5e28b9bb91619355ff410f843dfc8018aa0aca697fdf79df90780dc71009f4f2816461877eadd20142d41d2f359a4b1aa39f7cddcd0586049c43be7856fd
|
@@ -6,7 +6,8 @@ module Delayed
|
|
6
6
|
job.queue!
|
7
7
|
flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.queued')
|
8
8
|
else
|
9
|
-
|
9
|
+
status = t(job.status, scope: 'delayed/web.views.statuses')
|
10
|
+
flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.queued', status: status)
|
10
11
|
end
|
11
12
|
redirect_to jobs_path
|
12
13
|
end
|
@@ -16,12 +17,13 @@ module Delayed
|
|
16
17
|
job.destroy
|
17
18
|
flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.destroyed')
|
18
19
|
else
|
19
|
-
|
20
|
+
status = t(job.status, scope: 'delayed/web.views.statuses')
|
21
|
+
flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.destroyed', status: status)
|
20
22
|
end
|
21
23
|
redirect_to jobs_path
|
22
24
|
end
|
23
25
|
|
24
|
-
|
26
|
+
private
|
25
27
|
|
26
28
|
def job
|
27
29
|
@job ||= Delayed::Web::Job.find params[:id]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% title '
|
1
|
+
<% title t('delayed/web.views.jobs') %>
|
2
2
|
|
3
3
|
<div class="page-header">
|
4
4
|
<h1><%= title %></h1>
|
@@ -7,13 +7,13 @@
|
|
7
7
|
<table class="table table-bordered">
|
8
8
|
<thead>
|
9
9
|
<tr>
|
10
|
-
<th
|
11
|
-
<th
|
12
|
-
<th
|
13
|
-
<th
|
14
|
-
<th
|
15
|
-
<th style="width: 190px;"
|
16
|
-
<th style="width:
|
10
|
+
<th><%= t('delayed/web.views.id') %></th>
|
11
|
+
<th><%= t('delayed/web.views.status') %></th>
|
12
|
+
<th><%= t('delayed/web.views.created_at') %></th>
|
13
|
+
<th><%= t('delayed/web.views.run_at') %></th>
|
14
|
+
<th><%= t('delayed/web.views.attempts') %></th>
|
15
|
+
<th style="width: 190px;"><%= t('delayed/web.views.last_error') %></th>
|
16
|
+
<th style="width: 140px"><%= t('delayed/web.views.actions') %></th>
|
17
17
|
</tr>
|
18
18
|
</thead>
|
19
19
|
<tbody>
|
@@ -23,19 +23,25 @@
|
|
23
23
|
<td><%= link_to "##{job.id}", job_path(job) %></td>
|
24
24
|
<td>
|
25
25
|
<span class="<%= status_dom_class(job.status) %>">
|
26
|
-
<%= job.status.capitalize %>
|
26
|
+
<%= t(job.status, scope: 'delayed/web.views.statuses').capitalize %>
|
27
27
|
</span>
|
28
28
|
</td>
|
29
|
-
<td><%= job.created_at %></td>
|
30
|
-
<td><%= job.run_at %></td>
|
29
|
+
<td><%= l(job.created_at, format: :short) %></td>
|
30
|
+
<td><%= l(job.run_at, format: :short) %></td>
|
31
31
|
<td><%= job.attempts %></td>
|
32
|
-
<td
|
32
|
+
<td>
|
33
|
+
<% if job.last_error.present? %>
|
34
|
+
<%= link_to truncate(job.last_error), job_path(job) %>
|
35
|
+
<% else %>
|
36
|
+
<span class="label label-success"><%= t('delayed/web.views.errors.empty') %></span>
|
37
|
+
<% end %>
|
38
|
+
</td>
|
33
39
|
<td>
|
34
40
|
<% if job.can_queue? %>
|
35
|
-
<%= button_to '
|
41
|
+
<%= button_to t('delayed/web.views.buttons.run_next'), queue_job_path(job), method: :put, class: 'btn btn-mini btn-action', form_class: 'btn-rails pull-left', title: t('delayed/web.views.buttons.run_next') %>
|
36
42
|
<% end %>
|
37
43
|
<% if job.can_destroy? %>
|
38
|
-
<%= button_to '
|
44
|
+
<%= button_to t('delayed/web.views.buttons.delete'), job_path(job), method: :delete, class: 'btn btn-danger btn-mini btn-action', form_class: 'btn-rails pull-right', title: t('delayed/web.views.buttons.delete'), onclick: "return confirm('#{t('delayed/web.views.confirm.delete')}')" %>
|
39
45
|
<% end %>
|
40
46
|
</td>
|
41
47
|
</tr>
|
@@ -43,7 +49,7 @@
|
|
43
49
|
<% else %>
|
44
50
|
<tr>
|
45
51
|
<td colspan="7">
|
46
|
-
|
52
|
+
<%= t('delayed/web.views.queue.empty') %>
|
47
53
|
</td>
|
48
54
|
</tr>
|
49
55
|
<% end %>
|
@@ -1,21 +1,30 @@
|
|
1
|
-
<% title "
|
1
|
+
<% title "#{t('delayed/web.views.job')} ##{job.id}" %>
|
2
2
|
|
3
3
|
<div class="page-header">
|
4
4
|
<h1>
|
5
|
-
<%= link_to '
|
5
|
+
<%= link_to t('delayed/web.views.jobs'), jobs_path %> / <%= title %>
|
6
6
|
</h1>
|
7
7
|
<div class="btn-group">
|
8
8
|
<% if job.can_queue? %>
|
9
|
-
<%= button_to '
|
9
|
+
<%= button_to t('delayed/web.views.buttons.run_next'), queue_job_path(job), method: :put, class: 'btn', form_class: 'btn-rails pull-left' %>
|
10
10
|
<% end %>
|
11
11
|
<% if job.can_destroy? %>
|
12
|
-
<%= button_to '
|
12
|
+
<%= button_to t('delayed/web.views.buttons.delete'), job_path(job), method: :delete, class: 'btn btn-danger', form_class: 'btn-rails pull-right', onclick: "return confirm('#{t('delayed/web.views.confirm.delete')}')" %>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<h2
|
18
|
-
<
|
17
|
+
<h2><%= t('delayed/web.views.status') %></h2>
|
18
|
+
<p class="<%= status_dom_class(job.status) %>">
|
19
|
+
<%= t(job.status, scope: 'delayed/web.views.statuses').capitalize %>
|
20
|
+
</p>
|
19
21
|
|
20
|
-
<h2
|
22
|
+
<h2><%= t('delayed/web.views.last_error') %></h2>
|
23
|
+
<% if job.last_error.present? %>
|
24
|
+
<pre><%= job.last_error %></pre>
|
25
|
+
<% else %>
|
26
|
+
<p class="label label-success"><%= t('delayed/web.views.errors.empty') %></p>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<h2><%= t('delayed/web.views.handler') %></h2>
|
21
30
|
<pre><%= job.handler %></pre>
|
data/config/locales/en.yml
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
en:
|
2
2
|
delayed/web:
|
3
|
+
views:
|
4
|
+
id: ID
|
5
|
+
job: Job
|
6
|
+
jobs: Jobs
|
7
|
+
status: Status
|
8
|
+
created_at: Created At
|
9
|
+
run_at: Run At
|
10
|
+
attempts: Attempts
|
11
|
+
last_error: Last Error
|
12
|
+
handler: Handler
|
13
|
+
actions: Actions
|
14
|
+
buttons:
|
15
|
+
run_next: Run Next
|
16
|
+
delete: Delete
|
17
|
+
queue:
|
18
|
+
empty: An empty queue is a good queue.
|
19
|
+
errors:
|
20
|
+
empty: There is no error
|
21
|
+
statuses:
|
22
|
+
executing: Executing
|
23
|
+
failed: Failed
|
24
|
+
queued: Queued
|
25
|
+
confirm:
|
26
|
+
delete: Are you sure you want to delete this job ?
|
3
27
|
flashes:
|
4
28
|
jobs:
|
5
29
|
queued:
|
@@ -8,3 +32,7 @@ en:
|
|
8
32
|
destroyed:
|
9
33
|
alert: 'Job cannot be deleted because it is already %{status}'
|
10
34
|
notice: 'Job destroyed'
|
35
|
+
|
36
|
+
time:
|
37
|
+
formats:
|
38
|
+
short: '%d/%m/%Y at %I.%m %p'
|
@@ -0,0 +1,38 @@
|
|
1
|
+
fr:
|
2
|
+
delayed/web:
|
3
|
+
views:
|
4
|
+
id: ID
|
5
|
+
job: Tâche
|
6
|
+
jobs: Tâches
|
7
|
+
status: Statut
|
8
|
+
created_at: Ajouté le
|
9
|
+
run_at: Démarré le
|
10
|
+
attempts: Essais
|
11
|
+
last_error: Dernière Erreur
|
12
|
+
handler: Gestionnaire
|
13
|
+
actions: Actions
|
14
|
+
queue:
|
15
|
+
empty: Une file d'attente vide est une bonne file d'attente.
|
16
|
+
errors:
|
17
|
+
empty: Il n'y aucune erreur
|
18
|
+
buttons:
|
19
|
+
run_next: Suivant
|
20
|
+
delete: Supprimer
|
21
|
+
statuses:
|
22
|
+
executing: En cours
|
23
|
+
failed: Echec
|
24
|
+
queued: En Attente
|
25
|
+
confirm:
|
26
|
+
delete: Êtes-vous sûr de vouloir supprimer cette tâche ?
|
27
|
+
flashes:
|
28
|
+
jobs:
|
29
|
+
queued:
|
30
|
+
alert: Cette tâche ne peut pas être mise en file d'attente car elle est déjà %{status}
|
31
|
+
notice: Tâche placée en file d'attente
|
32
|
+
destroyed:
|
33
|
+
alert: Cette tâche ne peut pas être supprimée car elle est déjà %{status}
|
34
|
+
notice: Tâche supprimée
|
35
|
+
|
36
|
+
time:
|
37
|
+
formats:
|
38
|
+
short: '%d/%m/%Y à %H:%M'
|
data/lib/delayed/web/version.rb
CHANGED
@@ -21,29 +21,29 @@ describe Delayed::Web::StatusDecorator do
|
|
21
21
|
|
22
22
|
describe '#can_destroy?' do
|
23
23
|
it 'is true when failed' do
|
24
|
-
expect(failed_job.can_destroy?).to
|
24
|
+
expect(failed_job.can_destroy?).to be_truthy
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'is true when queued' do
|
28
|
-
expect(queued_job.can_destroy?).to
|
28
|
+
expect(queued_job.can_destroy?).to be_truthy
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'is false when executing' do
|
32
|
-
expect(executing_job.can_destroy?).to
|
32
|
+
expect(executing_job.can_destroy?).to be_falsy
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe '#can_queue?' do
|
37
37
|
it 'is true when failed' do
|
38
|
-
expect(failed_job.can_queue?).to
|
38
|
+
expect(failed_job.can_queue?).to be_truthy
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'is true when queued' do
|
42
|
-
expect(queued_job.can_queue?).to
|
42
|
+
expect(queued_job.can_queue?).to be_truthy
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'is false when executing' do
|
46
|
-
expect(executing_job.can_queue?).to
|
46
|
+
expect(executing_job.can_queue?).to be_falsy
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# README
|
2
2
|
|
3
3
|
This README would normally document whatever steps are necessary to get the
|
4
4
|
application up and running.
|
@@ -22,7 +22,3 @@ Things you may want to cover:
|
|
22
22
|
* Deployment instructions
|
23
23
|
|
24
24
|
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'config/application'
|
5
5
|
|
6
|
-
|
6
|
+
Rails.application.load_tasks
|
@@ -2,12 +2,12 @@
|
|
2
2
|
// listed below.
|
3
3
|
//
|
4
4
|
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
9
|
//
|
10
|
-
//
|
11
|
-
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
12
|
//
|
13
13
|
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the rails generate channel command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|
@@ -3,11 +3,13 @@
|
|
3
3
|
* listed below.
|
4
4
|
*
|
5
5
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the
|
9
|
-
* compiled file
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
10
12
|
*
|
11
|
-
*= require_self
|
12
13
|
*= require_tree .
|
14
|
+
*= require_self
|
13
15
|
*/
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= csrf_meta_tags %>
|
10
6
|
|
11
|
-
<%=
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
9
|
+
</head>
|
12
10
|
|
13
|
-
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
14
|
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
data/spec/dummy/bin/rails
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
begin
|
3
|
+
load File.expand_path('../spring', __FILE__)
|
4
|
+
rescue LoadError => e
|
5
|
+
raise unless e.message.include?('spring')
|
6
|
+
end
|
7
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
3
8
|
require_relative '../config/boot'
|
4
9
|
require 'rails/commands'
|
data/spec/dummy/bin/rake
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a starting point to setup your application.
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
# puts "\n== Copying sample files =="
|
22
|
+
# unless File.exist?('config/database.yml')
|
23
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
24
|
+
# end
|
25
|
+
|
26
|
+
puts "\n== Preparing database =="
|
27
|
+
system! 'bin/rails db:setup'
|
28
|
+
|
29
|
+
puts "\n== Removing old logs and tempfiles =="
|
30
|
+
system! 'bin/rails log:clear tmp:clear'
|
31
|
+
|
32
|
+
puts "\n== Restarting application server =="
|
33
|
+
system! 'bin/rails restart'
|
34
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require 'rubygems'
|
8
|
+
require 'bundler'
|
9
|
+
|
10
|
+
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
11
|
+
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
12
|
+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
13
|
+
gem 'spring', spring.version
|
14
|
+
require 'spring/binstub'
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a way to update your development environment automatically.
|
15
|
+
# Add necessary update steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
puts "\n== Updating database =="
|
22
|
+
system! 'bin/rails db:migrate'
|
23
|
+
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
25
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system! 'bin/rails restart'
|
29
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
5
7
|
Bundler.require(*Rails.groups)
|
6
8
|
require 'delayed-web'
|
7
9
|
|
@@ -10,14 +12,5 @@ module Dummy
|
|
10
12
|
# Settings in config/environments/* take precedence over those specified here.
|
11
13
|
# Application configuration should go into files in config/initializers
|
12
14
|
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
-
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
-
# config.i18n.default_locale = :de
|
21
15
|
end
|
22
16
|
end
|
23
|
-
|
data/spec/dummy/config/boot.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
3
2
|
|
4
|
-
require 'bundler/setup'
|
5
|
-
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
|
3
|
+
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
@@ -3,23 +3,23 @@
|
|
3
3
|
#
|
4
4
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
5
|
# gem 'sqlite3'
|
6
|
-
|
6
|
+
#
|
7
|
+
default: &default
|
7
8
|
adapter: sqlite3
|
8
|
-
database: db/development.sqlite3
|
9
9
|
pool: 5
|
10
10
|
timeout: 5000
|
11
11
|
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
12
16
|
# Warning: The database defined as "test" will be erased and
|
13
17
|
# re-generated from your development database when you run "rake".
|
14
18
|
# Do not set this db to the same as development or production.
|
15
19
|
test:
|
16
|
-
|
20
|
+
<<: *default
|
17
21
|
database: db/test.sqlite3
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
20
22
|
|
21
23
|
production:
|
22
|
-
|
24
|
+
<<: *default
|
23
25
|
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Load the
|
2
|
-
|
1
|
+
# Load the Rails application.
|
2
|
+
require_relative 'application'
|
3
3
|
|
4
|
-
# Initialize the
|
5
|
-
|
4
|
+
# Initialize the Rails application.
|
5
|
+
Rails.application.initialize!
|