@@ -78,7 +78,7 @@ export async function push(monitors: Monitor[], options: PushOptions) {
78
78
79
79
const { monitors : remote } = await bulkGetMonitors ( options ) ;
80
80
81
- progress ( `bundling ${ monitors . length } monitors` ) ;
81
+ progress ( `preparing ${ monitors . length } monitors` ) ;
82
82
const schemas = await buildMonitorSchema ( monitors , true ) ;
83
83
const local = getLocalMonitors ( schemas ) ;
84
84
@@ -90,7 +90,8 @@ export async function push(monitors: Monitor[], options: PushOptions) {
90
90
91
91
const updatedMonitors = new Set < string > ( [ ...changedIDs , ...newIDs ] ) ;
92
92
if ( updatedMonitors . size > 0 ) {
93
- const chunks = getChunks ( schemas , CHUNK_SIZE ) ;
93
+ const updatedMonSchemas = schemas . filter ( s => updatedMonitors . has ( s . id ) ) ;
94
+ const chunks = getChunks ( updatedMonSchemas , CHUNK_SIZE ) ;
94
95
for ( const chunk of chunks ) {
95
96
await liveProgress (
96
97
bulkPutMonitors ( options , chunk ) ,
@@ -217,9 +218,8 @@ export function validateSettings(opts: PushOptions) {
217
218
- CLI '--schedule <mins>'
218
219
- Config file 'monitors.schedule' field` ;
219
220
} else if ( opts . schedule && ! ALLOWED_SCHEDULES . includes ( opts . schedule ) ) {
220
- reason = `Set default schedule(${
221
- opts . schedule
222
- } ) to one of the allowed values - ${ ALLOWED_SCHEDULES . join ( ',' ) } `;
221
+ reason = `Set default schedule(${ opts . schedule
222
+ } ) to one of the allowed values - ${ ALLOWED_SCHEDULES . join ( ',' ) } `;
223
223
}
224
224
225
225
if ( ! reason ) return ;
@@ -288,7 +288,7 @@ export async function pushLegacy(monitors: Monitor[], options: PushOptions) {
288
288
289
289
let schemas : MonitorSchema [ ] = [ ] ;
290
290
if ( monitors . length > 0 ) {
291
- progress ( `bundling ${ monitors . length } monitors` ) ;
291
+ progress ( `preparing ${ monitors . length } monitors` ) ;
292
292
schemas = await buildMonitorSchema ( monitors , false ) ;
293
293
const chunks = getChunks ( schemas , 10 ) ;
294
294
for ( const chunk of chunks ) {
0 commit comments