postgresScheduleStoreFactory function
ScheduleStoreFactory
postgresScheduleStoreFactory(})
Creates a ScheduleStoreFactory backed by PostgreSQL.
Implementation
ScheduleStoreFactory postgresScheduleStoreFactory(
String uri, {
String namespace = 'stem',
String schema = 'public',
String? applicationName,
TlsConfig? tls,
}) {
return ScheduleStoreFactory(
create: () async => PostgresScheduleStore.connect(
uri,
namespace: namespace,
schema: schema,
applicationName: applicationName,
tls: tls,
),
dispose: (store) async {
if (store is PostgresScheduleStore) {
await store.close();
}
},
);
}