mirror of
https://github.com/penpot/penpot.git
synced 2026-09-08 13:09:22 +00:00
Merge remote-tracking branch 'origin/staging'
This commit is contained in:
commit
8093555acc
@ -26,7 +26,6 @@ export PENPOT_FLAGS="\
|
|||||||
enable-soft-rpc-rlimit \
|
enable-soft-rpc-rlimit \
|
||||||
enable-webhooks \
|
enable-webhooks \
|
||||||
enable-access-tokens \
|
enable-access-tokens \
|
||||||
disable-feature-components-v2 \
|
|
||||||
enable-file-validation \
|
enable-file-validation \
|
||||||
enable-file-schema-validation";
|
enable-file-schema-validation";
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@ export PENPOT_FLAGS="\
|
|||||||
enable-rpc-climit \
|
enable-rpc-climit \
|
||||||
enable-smtp \
|
enable-smtp \
|
||||||
enable-access-tokens \
|
enable-access-tokens \
|
||||||
disable-feature-components-v2 \
|
|
||||||
enable-file-validation \
|
enable-file-validation \
|
||||||
enable-file-schema-validation";
|
enable-file-schema-validation";
|
||||||
|
|
||||||
|
|||||||
@ -468,7 +468,7 @@
|
|||||||
|
|
||||||
(defn- read-import-v1
|
(defn- read-import-v1
|
||||||
[{:keys [::db/conn ::project-id ::profile-id ::input] :as cfg}]
|
[{:keys [::db/conn ::project-id ::profile-id ::input] :as cfg}]
|
||||||
(db/exec-one! conn ["SET idle_in_transaction_session_timeout = 0"])
|
(db/exec-one! conn ["SET LOCAL idle_in_transaction_session_timeout = 0"])
|
||||||
(db/exec-one! conn ["SET CONSTRAINTS ALL DEFERRED"])
|
(db/exec-one! conn ["SET CONSTRAINTS ALL DEFERRED"])
|
||||||
|
|
||||||
(pu/with-open [input (zstd-input-stream input)
|
(pu/with-open [input (zstd-input-stream input)
|
||||||
|
|||||||
@ -218,6 +218,14 @@
|
|||||||
:hint (ex-message error)
|
:hint (ex-message error)
|
||||||
:data edata}}))))
|
:data edata}}))))
|
||||||
|
|
||||||
|
(defmethod handle-exception java.io.IOException
|
||||||
|
[cause _ _]
|
||||||
|
(l/wrn :hint "io exception" :cause cause)
|
||||||
|
{::rres/status 500
|
||||||
|
::rres/body {:type :server-error
|
||||||
|
:code :io-exception
|
||||||
|
:hint (ex-message cause)}})
|
||||||
|
|
||||||
(defmethod handle-exception java.util.concurrent.CompletionException
|
(defmethod handle-exception java.util.concurrent.CompletionException
|
||||||
[cause request _]
|
[cause request _]
|
||||||
(let [cause' (ex-cause cause)]
|
(let [cause' (ex-cause cause)]
|
||||||
|
|||||||
@ -67,12 +67,10 @@
|
|||||||
[_ {:keys [::db/pool] :as cfg}]
|
[_ {:keys [::db/pool] :as cfg}]
|
||||||
(fn [{:keys [props] :as task}]
|
(fn [{:keys [props] :as task}]
|
||||||
(let [event (::event props)]
|
(let [event (::event props)]
|
||||||
|
(l/dbg :hint "process webhook event" :name (:name event))
|
||||||
(l/debug :hint "process webhook event"
|
|
||||||
:name (:name event))
|
|
||||||
|
|
||||||
(when-let [items (lookup-webhooks cfg event)]
|
(when-let [items (lookup-webhooks cfg event)]
|
||||||
(l/trace :hint "webhooks found for event" :total (count items))
|
(l/trc :hint "webhooks found for event" :total (count items))
|
||||||
|
|
||||||
(db/with-atomic [conn pool]
|
(db/with-atomic [conn pool]
|
||||||
(doseq [item items]
|
(doseq [item items]
|
||||||
|
|||||||
@ -65,18 +65,16 @@
|
|||||||
;; --- Command: import-binfile
|
;; --- Command: import-binfile
|
||||||
|
|
||||||
(defn- import-binfile
|
(defn- import-binfile
|
||||||
[{:keys [::wrk/executor ::bf.v1/project-id] :as cfg} input]
|
[{:keys [::wrk/executor ::bf.v1/project-id ::db/pool] :as cfg} input]
|
||||||
(db/tx-run! cfg
|
;; NOTE: the importation process performs some operations that
|
||||||
(fn [{:keys [::db/conn] :as cfg}]
|
;; are not very friendly with virtual threads, and for avoid
|
||||||
;; NOTE: the importation process performs some operations that
|
;; unexpected blocking of other concurrent operations we
|
||||||
;; are not very friendly with virtual threads, and for avoid
|
;; dispatch that operation to a dedicated executor.
|
||||||
;; unexpected blocking of other concurrent operations we
|
(let [result (px/invoke! executor (partial bf.v1/import-files! cfg input))]
|
||||||
;; dispatch that operation to a dedicated executor.
|
(db/update! pool :project
|
||||||
(let [result (px/invoke! executor (partial bf.v1/import-files! cfg input))]
|
{:modified-at (dt/now)}
|
||||||
(db/update! conn :project
|
{:id project-id})
|
||||||
{:modified-at (dt/now)}
|
result))
|
||||||
{:id project-id})
|
|
||||||
result))))
|
|
||||||
|
|
||||||
(def ^:private
|
(def ^:private
|
||||||
schema:import-binfile
|
schema:import-binfile
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
(db/create-array conn "uuid" ids)]]
|
(db/create-array conn "uuid" ids)]]
|
||||||
|
|
||||||
(db/exec-one! conn sql)
|
(db/exec-one! conn sql)
|
||||||
(l/trc :hist "queue tasks"
|
(l/trc :hist "enqueue tasks on redis"
|
||||||
:queue queue
|
:queue queue
|
||||||
:tasks (count ids)
|
:tasks (count ids)
|
||||||
:queued res)))
|
:queued res)))
|
||||||
|
|||||||
@ -140,20 +140,20 @@
|
|||||||
:else
|
:else
|
||||||
(try
|
(try
|
||||||
(l/trc :hint "start task"
|
(l/trc :hint "start task"
|
||||||
:queue queue
|
|
||||||
:runner-id id
|
|
||||||
:name (:name task)
|
:name (:name task)
|
||||||
:task-id (str task-id)
|
:task-id (str task-id)
|
||||||
|
:queue queue
|
||||||
|
:runner-id id
|
||||||
:retry (:retry-num task))
|
:retry (:retry-num task))
|
||||||
(let [tpoint (dt/tpoint)
|
(let [tpoint (dt/tpoint)
|
||||||
result (handle-task task)
|
result (handle-task task)
|
||||||
elapsed (dt/format-duration (tpoint))]
|
elapsed (dt/format-duration (tpoint))]
|
||||||
|
|
||||||
(l/trc :hint "end task"
|
(l/trc :hint "end task"
|
||||||
:queue queue
|
|
||||||
:runner-id id
|
|
||||||
:name (:name task)
|
:name (:name task)
|
||||||
:task-id (str task-id)
|
:task-id (str task-id)
|
||||||
|
:queue queue
|
||||||
|
:runner-id id
|
||||||
:retry (:retry-num task)
|
:retry (:retry-num task)
|
||||||
:elapsed elapsed)
|
:elapsed elapsed)
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,8 @@
|
|||||||
(def default-enabled-features
|
(def default-enabled-features
|
||||||
#{"fdata/shape-data-type"
|
#{"fdata/shape-data-type"
|
||||||
"styles/v2"
|
"styles/v2"
|
||||||
"layout/grid"})
|
"layout/grid"
|
||||||
|
"components/v2"})
|
||||||
|
|
||||||
;; A set of features which only affects on frontend and can be enabled
|
;; A set of features which only affects on frontend and can be enabled
|
||||||
;; and disabled freely by the user any time. This features does not
|
;; and disabled freely by the user any time. This features does not
|
||||||
|
|||||||
@ -14,11 +14,20 @@ http {
|
|||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
types_hash_max_size 2048;
|
types_hash_max_size 2048;
|
||||||
# server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
# server_names_hash_bucket_size 64;
|
# server_names_hash_bucket_size 64;
|
||||||
# server_name_in_redirect off;
|
# server_name_in_redirect off;
|
||||||
|
|
||||||
|
reset_timedout_connection on;
|
||||||
|
client_body_timeout 20s;
|
||||||
|
client_header_timeout 20s;
|
||||||
|
|
||||||
|
proxy_connect_timeout 300s;
|
||||||
|
proxy_send_timeout 300s;
|
||||||
|
proxy_read_timeout 300s;
|
||||||
|
send_timeout 300s;
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
@ -33,7 +42,7 @@ http {
|
|||||||
gzip_buffers 16 8k;
|
gzip_buffers 16 8k;
|
||||||
gzip_http_version 1.1;
|
gzip_http_version 1.1;
|
||||||
|
|
||||||
gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json;
|
gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json image/svg+xml;
|
||||||
|
|
||||||
map $http_upgrade $connection_upgrade {
|
map $http_upgrade $connection_upgrade {
|
||||||
default upgrade;
|
default upgrade;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user