1 | import {cpus} from 'os';
|
2 |
|
3 | export enum State {
|
4 | pending = 1,
|
5 | complete,
|
6 | stopped,
|
7 | }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export const PANDORA_GLOBAL_CONFIG = 'PANDORA_CONFIG';
|
14 | export const PANDORA_CWD = 'PANDORA_CWD';
|
15 | export const PANDORA_HOME = 'PANDORA_HOME';
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export const SEND_DAEMON_MESSAGE = 'send_daemon_message';
|
22 | export const DAEMON_READY = 'daemon_ready';
|
23 | export const DAEMON_MESSENGER = 'pandora_daemon_messenger';
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export const PROCFILE_NAMES = ['procfile.js', 'procfile.ts'];
|
30 | export const defaultWorkerCount = process.env.DEFAULT_WORKER_COUNT ? parseInt(process.env.DEFAULT_WORKER_COUNT) : cpus().length;
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | export const PROCESS_READY = 'process_ready';
|
37 | export const PROCESS_ERROR = 'process_error';
|
38 |
|
39 | export const WORKER_READY = 'worker_ready';
|
40 | export const WORKER_EXIT = 'worker_exit';
|
41 |
|
42 | export const SHUTDOWN = 'shutdown';
|
43 | export const FINISH_SHUTDOWN = 'finish_shutdown';
|
44 | export const SHUTDOWN_TIMEOUT = 5 * 1000;
|
45 |
|
46 | export const RELOAD = 'reload';
|
47 | export const RELOAD_SUCCESS = 'reload_success';
|
48 | export const RELOAD_ERROR = 'reload_error';
|
49 | export const RELOAD_TIMEOUT = 10 * 1000;
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | export const SERVICE_PREFIX_IN_HUB = '';
|
56 | export const SERVICE_RESERVE_NAME = ['all'];
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | export const PANDORA_PROCESS = 'PANDORA_PROCESS_REPRESENTATION';
|