ThinkJS 2.0 中文文档0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] action].html ����������� �� _ ��������������� / ��������� src/common/config/view.js � ������ cluster �������� CPU ��������������� ������� src/common/config/env/production.js ��������� ���������� file_depr: '/', //���������������� / } JavaScript ������� export default { cluster_on: true //�� cluster } JavaScript �������� JS ������� try/catch ������������ async/await ������ try/catch0 码力 | 238 页 | 1.87 MB | 1 年前3
ThinkJS 2.1 Documentation0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] //change joiner to / } JavaScript How To Open Multiple Threads export default { cluster_on: true //turn on cluster } JavaScript How To Modify Request Timeout Using JS’s try/catch can’t catching suffix that will be remove when parsing routers hook_on: true, // turns hook on cluster_on: false, //turns cluster on timeout: 120, //120 seconds auto_reload: false, //auto reload the changed0 码力 | 148 页 | 1.69 MB | 1 年前3
ThinkJS 2.0 Documentation0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] //change joiner to / } JavaScript How To Open Multiple Threads export default { cluster_on: true //�� cluster } JavaScript How To Modify Request Timeout export default { timeout: 30, // Change proxy_on: false, //���� nginx � web server ���� hook_on: true, //���� hook cluster_on: false, //���� cluster service_on: true, //Service available timeout: 120, //120 seconds auto_reload:0 码力 | 141 页 | 1.61 MB | 1 年前3
ThinkJS 2.2 Documentation0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] src/common/config/env/production.js , and add the following option to it: export default { cluster_on: true //turn on cluster } The default timeout in ThinkJS is 120 seconds, you can modify it by open src/common/config/config suffix that will be remove when parsing routers hook_on: true, // turns hook on cluster_on: false, //turns cluster on timeout: 120, //120 seconds auto_reload: false, //auto reload the changed0 码力 | 156 页 | 2.62 MB | 1 年前3
ThinkJS 2.2 中文文档http://127.0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] 如何开启 cluster 线上可以开启 cluster 功能达到利用多核 CPU 来提升性能,提高并发处理能力。 可以在配置文件 src/common/config/env/production.js 中加入如下的配置: export default { cluster_on: true //开启 cluster } 注 :如果使用 PM2 管理服务且开启了 cluster,那么 ThinkJS ThinkJS 里就无需再开启 cluster 了。 修改请求超时时间 默认请求的超时时间是 120s,可以通过修改配置文件 src/common/config/config.js 里 timeout 配置值。 export default { timeout: 30, //将超时时间修改为 30s } 如何捕获异常 JS 本身是无法通过 try/catch 来捕获异步异常的,但使用0 码力 | 277 页 | 3.61 MB | 1 年前3
ThinkJS 3.0 中文文档PRIMARY KEY (`id`), UNIQUE KEY `cookie` (`cookie`), KEY `expire` (`expire`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; redis Session 使用 redis 类型的Session需要依赖 think-redis 模块。 如何配置Session 配置文件 info() { } warn() { } error() { } } 多进程 node 中提供了 cluster 模块来创建多进程应用,这样可以避免单一进程挂了导致服务异常的情 况。框架是通过 think-cluster 模块来运行多进程模型的。 多进程配置 可以配置 workers 指定子进程的数量,默认为 0 (当前 cpu 的个数) //src/config/config 模型中更多的操作方式请见相关的 API -> model。 事务 模型中提供了对事务操作的支持,但前提需要数据库支持事务。 Mysql 中的 InnoDB 和 BDB 存储引擎支持事务,如果在 Mysql 下使用事务的话,需要将数据库 的存储引擎设置为 InnoDB 或 BDB。 SQLite 直接支持事务。 使用事务 模型中提供了 startTrans , commit 和 rollback0 码力 | 129 页 | 2.12 MB | 1 年前3
Celery 2.1 DocumentationContrib: Abortable tasks - celery.contrib.abortable Events - celery.events In-memory Representation of Cluster State - celery.events.state App: Worker Node - celery.apps.worker App: Periodic Task Scheduler - Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different queues. A single worker node can be bound to one or more those replies. Since there’s no central authority to know how many workers are available in the cluster, there is also no way to estimate how many workers may send a reply, so the client has a configurable0 码力 | 463 页 | 861.69 KB | 1 年前3
Celery 2.2 DocumentationCelery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different queues. A single worker node can be bound to one or more those replies. Since there’s no central authority to know how many workers are available in the cluster, there is also no way to estimate how many workers may send a reply, so the client has a configurable kicks off tasks at regular intervals, which are then executed by the worker nodes available in the cluster. By default the entries are taken from the CELERYBEAT_SCHEDULE setting, but custom stores can also0 码力 | 505 页 | 878.66 KB | 1 年前3
Celery 2.0 DocumentationContrib: Abortable tasks - celery.contrib.abortable Events - celery.events In-memory Representation of Cluster State - celery.events.state Celery Worker Daemon - celery.bin.celeryd Celery Periodic Task Server those replies, but since there’s no central authority to know how many workers are available in the cluster, there is also no way to estimate how many workers may send a reply. Therefore the client has a configurable information about InnoDBs transaction model see MySQL - The InnoDB Transaction Model and Locking [http://dev.mysql.com/doc/refman/5.1/en/innodb-transaction- model.html] in the MySQL user manual. (Thanks0 码力 | 284 页 | 332.71 KB | 1 年前3
Celery 2.3 DocumentationCelery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different queues. A single worker node can be bound to one or more those replies. Since there’s no central authority to know how many workers are available in the cluster, there is also no way to estimate how many workers may send a reply, so the client has a configurable kicks off tasks at regular intervals, which are then executed by the worker nodes available in the cluster. By default the entries are taken from the CELERYBEAT_SCHEDULE setting, but custom stores can also0 码力 | 530 页 | 900.64 KB | 1 年前3
共 731 条
- 1
- 2
- 3
- 4
- 5
- 6
- 74













