solid_stack_web 1.6.2 → 1.6.3
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 +4 -4
- data/app/controllers/solid_stack_web/jobs_controller.rb +12 -3
- data/lib/solid_stack_web/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7bbfe1cfe021008f9094a393c1565d9f5e6464ec45357110691afb12c95d7c4
|
|
4
|
+
data.tar.gz: 4377ffd5d97640175f5e5c2c0fc5216146cfc64bc556b5e05ae27982bd1ed12f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c51a465014bb16d118f80d0295fc1305c79ab03dd8fefd63e6b3a8f68d70b0329e4edc919dda7b5f33acb80263a429e269d22d0c33d4ed887cdce5db1d71c49c
|
|
7
|
+
data.tar.gz: faca09124c58ed725ee12f5ad4881a85759987fef8da52bf0038d61bc0ffec00cac8925fe19ed05ad3fa7dac9e9dc9f53edd89565523b75c64528217c279e039
|
|
@@ -23,9 +23,7 @@ module SolidStackWeb
|
|
|
23
23
|
|
|
24
24
|
def show
|
|
25
25
|
@execution = Job::EXECUTION_MODELS[@status].includes(:job).find(params[:id])
|
|
26
|
-
@arguments =
|
|
27
|
-
rescue JSON::ParserError
|
|
28
|
-
@arguments = nil
|
|
26
|
+
@arguments = parsed_arguments(@execution.job.arguments)
|
|
29
27
|
end
|
|
30
28
|
|
|
31
29
|
def destroy
|
|
@@ -53,6 +51,17 @@ module SolidStackWeb
|
|
|
53
51
|
|
|
54
52
|
private
|
|
55
53
|
|
|
54
|
+
# SolidQueue::Job serializes arguments as JSON, so real jobs yield an already-parsed Hash;
|
|
55
|
+
# only legacy or hand-written rows hold a raw JSON string.
|
|
56
|
+
def parsed_arguments(arguments)
|
|
57
|
+
return if arguments.blank?
|
|
58
|
+
return arguments unless arguments.is_a?(String)
|
|
59
|
+
|
|
60
|
+
JSON.parse(arguments)
|
|
61
|
+
rescue JSON::ParserError
|
|
62
|
+
nil
|
|
63
|
+
end
|
|
64
|
+
|
|
56
65
|
def set_status
|
|
57
66
|
@status = params[:status].presence_in(Job::STATUSES) || "ready"
|
|
58
67
|
end
|