File tree Expand file tree Collapse file tree
src/main/java/tech/artcoded/sync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ public void configure() throws Exception {
3939 .transform ().simple ("Exception occurred due: ${exception.message}" )
4040 .log ("${body}" )
4141 .doTry ()
42- .setHeader (CORRELATION_ID , body ( ))
43- .setHeader (HEADER_TITLE , exchangeProperty ( HEADER_TITLE ))
44- .setHeader (HEADER_TYPE , exchangeProperty ( HEADER_TYPE ))
42+ .setHeader (CORRELATION_ID , constant ( "GOOGLE_DRIVE_ERROR" ))
43+ .setHeader (HEADER_TITLE , body ( ))
44+ .setHeader (HEADER_TYPE , constant ( SYNC_DATA_DRIVE ))
4545 .to (ExchangePattern .InOnly , NOTIFICATION_ENDPOINT )
4646 .endDoTry ();
4747
@@ -68,7 +68,7 @@ public void configure() throws Exception {
6868 @ SneakyThrows
6969 void scheduledDeletion () {
7070 var drive = this .driveService .getDrive ();
71- var files = drive .files ().list ().execute ();
71+ var files = drive .files ().list ().setFields ( "files(id,name,createdTime)" ). execute ();
7272 var quota = drive .about ().get ().setFields ("storageQuota" ).execute ().getStorageQuota ();
7373
7474 double percentUsed = (quota .getUsage () * 100.0 ) / quota .getLimit ();
You can’t perform that action at this time.
0 commit comments