/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { BylineCore } from '../core.js'; import type { BylineLogger } from '../logger/index.js'; import type { ISchedulerStore, RecurringTaskDefinition } from './types.js'; export interface SchedulerOptions { tickIntervalMs?: number; startupJitterMs?: number; concurrency?: number; owner?: string; shutdownGraceMs?: number; } export interface SchedulerController { stop(): Promise; } interface SchedulerDeps extends SchedulerOptions { store: ISchedulerStore; tasks: readonly RecurringTaskDefinition[]; owner: string; logger: BylineLogger; } /** * Dependency-injected ticker used by unit tests. It is intentionally absent * from the `@byline/core/scheduler` barrel. */ export declare function startSchedulerWithDeps(params: SchedulerDeps): SchedulerController; /** Start the opt-in, in-process ticker over the definitions vetted at boot. */ export declare function startBylineScheduler(core: BylineCore, options?: SchedulerOptions): SchedulerController; export {};