Skip to content
Snippets Groups Projects
Commit dd24176d authored by Simon Belak's avatar Simon Belak
Browse files

Remove unneeded order-by

parent 05761aee
No related branches found
No related tags found
No related merge requests found
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
Uses the same logic as `metabase.api.card`." Uses the same logic as `metabase.api.card`."
[{:keys [created_at ended_at]}] [{:keys [created_at ended_at]}]
(let [duration (time-delta-seconds created_at ended_at) (let [duration (time-delta-seconds created_at ended_at)
ttl (* duration (public-settings/query-caching-ttl-ratio)) ttl (* duration (public-settings/query-caching-ttl-ratio))
age (time-delta-seconds ended_at (java.util.Date.))] age (time-delta-seconds ended_at (java.util.Date.))]
(<= age ttl))) (<= age ttl)))
(defn- cached-job (defn- cached-job
...@@ -82,8 +82,7 @@ ...@@ -82,8 +82,7 @@
(when (public-settings/enable-query-caching) (when (public-settings/enable-query-caching)
(let [job (db/select-one ComputationJob (let [job (db/select-one ComputationJob
:context (json/encode ctx) :context (json/encode ctx)
:status [:not= "error"] :status [:not= "error"])]
{:order-by [[:ended_at :desc]]})]
(when (some-> job fresh?) (when (some-> job fresh?)
job)))) job))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment