@hotmeshio/hotmesh
Version:
Serverless Workflow
20 lines (19 loc) • 962 B
TypeScript
import { EngineService } from '../engine';
import { ActivityData, ActivityMetadata, ActivityType, CycleActivity } from '../../types/activity';
import { ProviderTransaction } from '../../types/provider';
import { JobState } from '../../types/job';
import { Activity } from './activity';
declare class Cycle extends Activity {
config: CycleActivity;
constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService, context?: JobState);
process(): Promise<string>;
/**
* Trigger the target ancestor to execute in a cycle,
* without violating the constraints of the DAG. Immutable
* `individual activity state` will execute in a new dimensional
* thread while `shared job state` can change. This
* pattern allows for retries without violating the DAG.
*/
cycleAncestorActivity(transaction: ProviderTransaction): Promise<string>;
}
export { Cycle };