From 4ea6322d08a6f4cc92576d82a1fde84a7c6c68ec Mon Sep 17 00:00:00 2001 From: mrpowerus Date: Thu, 17 Jun 2021 16:18:58 +0200 Subject: [PATCH] Added break for failed jobs --- src/salesforce_bulk_python/bulk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/salesforce_bulk_python/bulk.py b/src/salesforce_bulk_python/bulk.py index b1de43a..38390a6 100644 --- a/src/salesforce_bulk_python/bulk.py +++ b/src/salesforce_bulk_python/bulk.py @@ -155,6 +155,9 @@ async def start(self): status = await self.status() print(f'{self.object.name}: {status}') + if status=='Failed': + break + if status=='JobComplete': await self.on_complete(f"{self.connection.instance_url}/services/data/{self.connection.settings.api_version}/jobs/query/{self.id}/results",self) print(f'Finished job for {self.object.name}') @@ -251,4 +254,5 @@ async def run_all(self): ) else: break - \ No newline at end of file + + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy