import { TransactionConfig } from './Transaction.js'; import Logger from '../Logger/Logger.js'; import Publisher from '../Publisher/Publisher.js'; /** * A type that represents a modified version of the TransactionConfig type, excluding the 'throwOnErrors' and 'syncReturn' properties. */ export type ProcessConfig = Omit; /** * Represents a long-running process that executes a given function at a specified interval. */ export default class Process { /** * Private member variable representing the interval value. * @type {number} * @private */ private interval; /** * A logger object used for logging messages, errors, and other information. * @readonly */ readonly logger: Logger; /** * The publisher of the content. */ readonly publisher: Publisher; /** * A reference to the NodeJS.Timeout object representing the interval timer. */ timeout: NodeJS.Timeout; /** * Constructs a new instance of the LongRunningProcess class. * @param {ProcessConfig} config - The configuration object for the process. * @param {number} interval - The interval at which the process should run. * @returns None */ constructor(config: ProcessConfig, interval: number); /** * Executes the provided execution function at a specified interval. * @param {Function} executionFunc - The function to execute. * @returns None */ execute(executionFunc: any): Promise; /** * Executes the given execution function asynchronously and handles any exceptions that occur. * @param {Function} executionFunc - The function to execute. * @returns {boolean} - Returns true if the execution failed, false otherwise. */ private iexecute; }