@@ -65,7 +65,7 @@ export default {
6565 )
6666 )
6767 . orderBy ( asc ( sql `date(timestamp)` ) )
68- . limit ( 99 ) // Limit to 99 days which is the limit of the workflow instances
68+ . limit ( 100 ) // Limit to 100 days which is the limit of the number of workflow instances you can create in a batch
6969 . catch ( ( error ) => {
7070 throw new Error ( "Failed to get dates" , { cause : error } ) ;
7171 } ) ;
@@ -386,7 +386,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
386386 async run ( event : WorkflowEvent < OvernightSaveToR2Params > , step : WorkflowStep ) {
387387 // Can access bindings on `this.env`
388388 // Can access params on `event.payload`
389- const firstStep = await step . do (
389+ await step . do (
390390 "Download data, and upload to R2" ,
391391 {
392392 retries : {
@@ -406,7 +406,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
406406 const startOfPeriod = new Date (
407407 dayToProcess . getFullYear ( ) ,
408408 dayToProcess . getMonth ( ) ,
409- dayToProcess . getDate ( ) - 1 ,
409+ dayToProcess . getDate ( ) ,
410410 0 ,
411411 0 ,
412412 0 ,
@@ -415,7 +415,7 @@ export class OvernightSaveToR2 extends WorkflowEntrypoint<
415415 const endOfPeriod = new Date (
416416 dayToProcess . getFullYear ( ) ,
417417 dayToProcess . getMonth ( ) ,
418- dayToProcess . getDate ( ) ,
418+ dayToProcess . getDate ( ) + 1 ,
419419 0 ,
420420 0 ,
421421 0 ,
0 commit comments