UNPKG

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