From 4663a58c293494c578d26edbc60936734791c058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieliski?= Date: Wed, 5 Jun 2024 08:18:36 +0200 Subject: [PATCH] Wait 5 sec after each import --- WebAPI/Controllers/LayersController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WebAPI/Controllers/LayersController.cs b/WebAPI/Controllers/LayersController.cs index b6d4a01..9595fbf 100644 --- a/WebAPI/Controllers/LayersController.cs +++ b/WebAPI/Controllers/LayersController.cs @@ -189,6 +189,7 @@ namespace WebAPI.Controllers { MorskaImporter importer = new MorskaImporter(db, googleSheetValues, this); importer.import(importWorker); + Thread.Sleep(5000); // be aware of GSheet API quota logsController.AddEntry(new LogEntry { @@ -203,7 +204,8 @@ namespace WebAPI.Controllers { MorskaImporter importer = new MorskaImporter(db, googleSheetValues, this); importer.import(importWorker); - + Thread.Sleep(5000); // be aware of GSheet API quota + logsController.AddEntry(new LogEntry { Title = $"{importWorker!.Name}, {importWorker.Id}",