Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent empty harvest run to fail #1395

Merged
merged 1 commit into from Jan 23, 2018
Merged

Prevent empty harvest run to fail #1395

merged 1 commit into from Jan 23, 2018

Conversation

noirbizarre
Copy link
Contributor

Prevent empty harvest jobs to fail with Celery

Fix #1394

@@ -18,12 +18,15 @@ def harvest(self, ident):
source = HarvestSource.get(ident)
Backend = backends.get(source.backend)
backend = Backend(source)
if backend.perform_initialization():
items = backend.perform_initialization()
if items > 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if items and else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because failed batch returns None

@noirbizarre noirbizarre merged commit 0c7a5fd into opendatateam:master Jan 23, 2018
@noirbizarre noirbizarre deleted the gh#1394-no-chord-for-empty-harvest branch January 23, 2018 15:46
@noirbizarre
Copy link
Contributor Author

@noirbizarre
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants