/
n-dimens
/
pgloader
Обзор
Документация
Войти
/
n-dimens
/
pgloader
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/utils/threads.lisp
39 строк
2 KB
Dimitri Fontaine
Make sure the image knows how to print circular data structures.
16 ноя 2018, 02:03
16 ноя 2018, 02:03
8b1acba
Код
Авторство
О чём код?
;;; ;;; For communication purposes, the lparallel kernel must be created with ;;; access to some common bindings. ;;; (in-package :pgloader.utils) (defun make-kernel (worker-count &key (bindings `((*print-circle* . ,*print-circle*) (*print-pretty* . ,*print-pretty*) (*monitoring-queue* . ,*monitoring-queue*) (*copy-batch-rows* . ,*copy-batch-rows*) (*copy-batch-size* . ,*copy-batch-size*) (*rows-per-range* . ,*rows-per-range*) (*prefetch-rows* . ,*prefetch-rows*) (*pg-settings* . ',*pg-settings*) (*mysql-settings* . ',*mysql-settings*) (*mssql-settings* . ',*mssql-settings*) (*root-dir* . ,*root-dir*) (*fd-path-root* . ,*fd-path-root*) (*client-min-messages* . ,*client-min-messages*) (*log-min-messages* . ,*log-min-messages*) ;; needed in create index specific kernels (*pgsql-reserved-keywords* . ',*pgsql-reserved-keywords*) (*preserve-index-names* . ,*preserve-index-names*) (*identifier-case* . ,*identifier-case*) ;; bindings updates for libs ;; CFFI is used by the SQLite lib (cffi:*default-foreign-encoding* . ,cffi:*default-foreign-encoding*) ;; CL+SSL can be picky about verifying certs (cl+ssl:*make-ssl-client-stream-verify-default* . ,cl+ssl:*make-ssl-client-stream-verify-default*)))) "Wrapper around lparallel:make-kernel that sets our usual bindings." (lp:make-kernel worker-count :bindings bindings))