                                                script-defaults)))
            context)))
 
+(def ^:private script-base-defaults
+  {:timeout (* 15 60)
+   })
+
 (defn build-tasks
   "Build the tasks for the given top-level specification."
   [job _spec]

                spec
                (conj (or (:task-defaults spec) {})
                      {:job_id (:id job)})
                (or (:script-defaults spec) {}))]
    (doseq [raw-task tasks]
      (wrap-exception-create-job-issue
        job "Error during task creation"

    scripts
    (throw (IllegalStateException. (str ":scripts must a map " scripts)))))

(defn- coerce-script-value [value]
  (cond
    (map? value) value
    (string? value) {:body value}
    :else (throw (IllegalStateException.
                   (str "don't know how to handle type " (type value))))))

