Skip to content

Commit 97b75b9

Browse files
committed
fix gdrive error
1 parent d2a3851 commit 97b75b9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/tech/artcoded/sync/SyncRouteBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)