File tree 4 files changed +6
-12
lines changed
4 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,11 @@ export default class GoogleFit implements Integration {
85
85
}
86
86
87
87
async legacy ( start : string ) {
88
- const CONCURRENCY = 1 ;
89
88
const startDate = dayjs ( start ) ;
90
- let count = 0 ;
91
- const pool = new PromisePool ( async ( ) => {
89
+ for await ( const count of [ ...Array ( dayjs ( ) . diff ( startDate , "day" ) ) . keys ( ) ] ) {
92
90
const date = dayjs ( startDate ) . add ( count , "day" ) ;
93
- if ( dayjs ( ) . diff ( date , "day" ) === 0 ) return null ;
94
- count ++ ;
95
- return updateGoogleFitDailyData ( date . toDate ( ) ) ;
96
- } , CONCURRENCY ) ;
97
- await pool . start ( ) ;
91
+ await updateGoogleFitDailyData ( date . toDate ( ) ) ;
92
+ }
98
93
console . log ( "Done!" ) ;
99
94
}
100
95
Original file line number Diff line number Diff line change @@ -185,10 +185,9 @@ export default class LastDotFm implements Integration {
185
185
const startDate = dayjs ( start ) ;
186
186
for await ( const count of [ ...Array ( dayjs ( ) . diff ( startDate , "day" ) ) . keys ( ) ] ) {
187
187
const date = dayjs ( startDate ) . add ( count , "day" ) ;
188
- return getLastFmTracks ( date . toDate ( ) ) ;
188
+ await getLastFmTracks ( date . toDate ( ) ) ;
189
189
}
190
190
console . log ( "Done!" ) ;
191
- console . log ( "Done!" ) ;
192
191
}
193
192
async summary ( ) { }
194
193
}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ export default class OuraRing implements Integration {
142
142
const startDate = dayjs ( start ) ;
143
143
for await ( const count of [ ...Array ( dayjs ( ) . diff ( startDate , "day" ) ) . keys ( ) ] ) {
144
144
const date = dayjs ( startDate ) . add ( count , "day" ) ;
145
- return updateOuraDailyData ( date . toDate ( ) ) ;
145
+ await updateOuraDailyData ( date . toDate ( ) ) ;
146
146
}
147
147
console . log ( "Done!" ) ;
148
148
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default class Wakatime implements Integration {
47
47
const startDate = dayjs ( start ) ;
48
48
for await ( const count of [ ...Array ( dayjs ( ) . diff ( startDate , "day" ) ) . keys ( ) ] ) {
49
49
const date = dayjs ( startDate ) . add ( count , "day" ) ;
50
- return updateWakatimeDailyData ( date . toDate ( ) ) ;
50
+ await updateWakatimeDailyData ( date . toDate ( ) ) ;
51
51
}
52
52
console . log ( "Done!" ) ;
53
53
}
You can’t perform that action at this time.
0 commit comments