Scheduled rebuilds
Choosing when to rebuild your replica
const myCustomDataSource = createReplicaDataSource({
// Update the data each time the agent starts.
pullDumpOnRestart: true,
// Update the data each day at midnight and 6.30pm.
pullDumpOnSchedule: ['0 0 0 * * *', '0 30 18 * * *'],
// Handler to fetch all records from the target API.
pullDumpHandler: async () => {
// Implement handler here
},
});Programming your handler
Last updated