export class Scheduler extends Context.Tag("Service/Scheduler")<
Scheduler,
{ ... }
>() {}
const make = gen(function*() {
yield* logDebug("Preparing");
// ...
});
export const layer = Layer.effect(Scheduler, make);
const SchedulerLive = Scheduler.layer.pipe(
Layer.provide(
Layer.mergeAll(PrismaJobRepository.live, Timer.live, UUIDProvider.live),
),
);
export const ServicesLive = pipe(
Layer.mergeAll(
...
SchedulerLive,
),
Layer.provide(Logger.minimumLogLevel(LogLevel.Debug)),
);
export const LARISEL_RUNTIME = ManagedRuntime.make(ServicesLive);
export class Scheduler extends Context.Tag("Service/Scheduler")<
Scheduler,
{ ... }
>() {}
const make = gen(function*() {
yield* logDebug("Preparing");
// ...
});
export const layer = Layer.effect(Scheduler, make);
const SchedulerLive = Scheduler.layer.pipe(
Layer.provide(
Layer.mergeAll(PrismaJobRepository.live, Timer.live, UUIDProvider.live),
),
);
export const ServicesLive = pipe(
Layer.mergeAll(
...
SchedulerLive,
),
Layer.provide(Logger.minimumLogLevel(LogLevel.Debug)),
);
export const LARISEL_RUNTIME = ManagedRuntime.make(ServicesLive);