UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

111 lines (110 loc) 4.65 kB
import { LogLevel } from '../types/logger'; /** * Determines the log level for the application. The default is 'info'. */ export declare const HMSH_LOGLEVEL: LogLevel; /** * Determines the log level for telemetry. The default is 'info' which emits worker and trigger spans. 'debug' emits all spans. */ export declare const HMSH_TELEMETRY: "debug" | "info"; /** * If Redis, explicitly sets whether the application is running in a cluster. The default is false. * @deprecated */ export declare const HMSH_IS_CLUSTER: boolean; /** * Default cleanup time for signal in the db when its associated job is completed. */ export declare const HMSH_SIGNAL_EXPIRE = 3600; export declare const HMSH_CODE_SUCCESS = 200; export declare const HMSH_CODE_PENDING = 202; export declare const HMSH_CODE_NOTFOUND = 404; export declare const HMSH_CODE_INTERRUPT = 410; export declare const HMSH_CODE_UNKNOWN = 500; export declare const HMSH_CODE_TIMEOUT = 504; export declare const HMSH_CODE_UNACKED = 999; /** * This is thrown when a Meshflow has been interrupted by a sleepFor call. */ export declare const HMSH_CODE_MESHFLOW_SLEEP = 588; /** * This is thrown when a Meshflow has been interrupted by a Promise.all call. */ export declare const HMSH_CODE_MESHFLOW_ALL = 589; /** * This is thrown when a Meshflow has been interrupted by an execChild or startChild call. */ export declare const HMSH_CODE_MESHFLOW_CHILD = 590; /** * This is thrown when a Meshflow has been interrupted by a proxyActivity call. */ export declare const HMSH_CODE_MESHFLOW_PROXY = 591; /** * This is thrown when a Meshflow has been interrupted by a waitForSignal call. */ export declare const HMSH_CODE_MESHFLOW_WAIT = 595; /** * The timeout status code for Meshflow. This status code is thrown when Meshflow has encountered a timeout error and needs to aler the caller why the call failed. */ export declare const HMSH_CODE_MESHFLOW_TIMEOUT = 596; /** * The maxed status code for Meshflow. This status code is used to indicate that the Meshflow has reached the maximum * number of attempts and should be halted. Thrown from a proxied activity or a flow to halt standard execution * and prevent further attempts. */ export declare const HMSH_CODE_MESHFLOW_MAXED = 597; /** * The fatal status code for Meshflow. This status code is used to indicate that the Meshflow has encountered a fatal error. Throw from a proxied activity or a flow to halt standard execution. */ export declare const HMSH_CODE_MESHFLOW_FATAL = 598; /** * The retryable status code for Meshflow. This status code is used to indicate that the Meshflow has encountered a retryable error (essentially unknown and covered by the standard retry policy). */ export declare const HMSH_CODE_MESHFLOW_RETRYABLE = 599; export declare const HMSH_STATUS_UNKNOWN = "unknown"; /** * The number of cycles to re/try for a quorum to be established. */ export declare const HMSH_QUORUM_ROLLCALL_CYCLES = 12; /** * The delay in milliseconds between quorum rollcall cycles. */ export declare const HMSH_QUORUM_DELAY_MS = 250; /** * The number of times the call-response exchange must succeed in succession to establish a quorum. */ export declare const HMSH_ACTIVATION_MAX_RETRY = 3; export declare const HMSH_DEPLOYMENT_DELAY: number; export declare const HMSH_DEPLOYMENT_PAUSE: number; export declare const HMSH_OTT_WAIT_TIME: number; export declare const HMSH_EXPIRE_JOB_SECONDS: number; export declare const MAX_STREAM_BACKOFF: number; export declare const INITIAL_STREAM_BACKOFF: number; export declare const MAX_STREAM_RETRIES: number; export declare const MAX_DELAY = 2147483647; export declare const HMSH_MAX_RETRIES: number; export declare const HMSH_MAX_TIMEOUT_MS: number; export declare const HMSH_GRADUATED_INTERVAL_MS: number; /** * The maximum number of attempts to retry a MeshFlow job before it is considered failed. * @default 3 */ export declare const HMSH_MESHFLOW_MAX_ATTEMPTS = 3; /** * The maximum interval to wait before retrying a MeshFlow job. * @default 120s */ export declare const HMSH_MESHFLOW_MAX_INTERVAL = "120s"; /** * The exponential backoff factor to apply to the interval between retries. * @default 10 */ export declare const HMSH_MESHFLOW_EXP_BACKOFF = 10; export declare const HMSH_BLOCK_TIME_MS: number; export declare const HMSH_XCLAIM_DELAY_MS: number; export declare const HMSH_XCLAIM_COUNT: number; export declare const HMSH_XPENDING_COUNT: number; export declare const HMSH_EXPIRE_DURATION: number; export declare const HMSH_FIDELITY_SECONDS: number; export declare const HMSH_SCOUT_INTERVAL_SECONDS: number; export declare const HMSH_GUID_SIZE: number;