Skip to content

GetCrawler

Source: src/AWS/Glue/GetCrawler.ts

Runtime binding for glue:GetCrawler.

Reads the bound Crawler’s metadata — most usefully its State (READY, RUNNING, STOPPING) and LastCrawl outcome — so runtime code can poll a crawl started with StartCrawler to completion. The crawler name is injected from the binding. Provide the implementation with Effect.provide(AWS.Glue.GetCrawlerHttp).

// init
const startCrawler = yield* AWS.Glue.StartCrawler(crawler);
const getCrawler = yield* AWS.Glue.GetCrawler(crawler);
// runtime
yield* startCrawler();
const done = yield* getCrawler().pipe(
Effect.repeat({
schedule: Schedule.spaced("10 seconds"),
until: (r) => r.Crawler?.State === "READY",
times: 8,
}),
);