const scrapes = (urls: string[] ) => Effect.gen(function* () {
const tasks = urls.map((url) => Effect.gen( function* (){
//<run some other effects that need a page service>
}).pipe(
// Should I use Effect.provide(Layer.fresh) here or Effect.provideService(Page, <implementation>) or Effect.provideServiceEffect<Page, implementation>
))
return results = yield* Effect.all(tasks, {
concurrency: 'unbounded'
})
})
const scrapes = (urls: string[] ) => Effect.gen(function* () {
const tasks = urls.map((url) => Effect.gen( function* (){
//<run some other effects that need a page service>
}).pipe(
// Should I use Effect.provide(Layer.fresh) here or Effect.provideService(Page, <implementation>) or Effect.provideServiceEffect<Page, implementation>
))
return results = yield* Effect.all(tasks, {
concurrency: 'unbounded'
})
})