-
Notifications
You must be signed in to change notification settings - Fork 0
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
Harvest data from online OJS instances at fixed interval # 47 #87
base: main
Are you sure you want to change the base?
Conversation
uxairibrar
commented
Feb 13, 2025
- Configured Django-Q task scheduling to automate harvesting at defined intervals.
- Developed unit tests for task scheduling (test_task_scheduling) and duplicate prevention (test_no_duplicates).
- Created HarvestingEvent model to track harvesting jobs and their statuses.
- Modified the Publication model to support additional metadata.
- Added Django Admin actions for manually triggering harvesting from the admin panel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any code related to Django-Q in this PR.
Could you please add a few illustrating screenshots how the interaction with the admin UI works? Thanks!
@@ -35,7 +35,7 @@ | |||
SECRET_KEY = env('SECRET_KEY', default='django-insecure') | |||
|
|||
# SECURITY WARNING: don't run with debug turned on in production! | |||
DEBUG = env('OPTIMAP_DEBUG', default=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this change - we still need to be able to disable debug mode!
@@ -173,7 +173,7 @@ | |||
CACHE_MIDDLEWARE_SECONDS = env('OPTIMAP_CACHE_SECONDS', default=3600) | |||
|
|||
# for testing email sending EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | |||
EMAIL_BACKEND = env('OPTIMAP_EMAIL_BACKEND', default='django.core.mail.backends.console.EmailBackend') | |||
EMAIL_BACKEND = env('OPTIMAP_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert: for development, we want to keep to console as the default case. Adjust your specific configuration when you work on emails.
@@ -183,6 +183,8 @@ | |||
EMAIL_USE_TLS = env('OPTIMAP_EMAIL_USE_TLS', default=False) | |||
EMAIL_USE_SSL = env('OPTIMAP_EMAIL_USE_SSL', default=False) | |||
EMAIL_IMAP_SENT_FOLDER = env('OPTIMAP_EMAIL_IMAP_SENT_FOLDER', default='') | |||
OAI_USERNAME = os.getenv("OAI_USERNAME") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the naming scheme of other environment variables.
time.sleep(2) | ||
schedule = Schedule.objects.filter(name=f"Harvest Source {source.id}") | ||
self.assertTrue(schedule.exists(), "Django-Q task not scheduled for source.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to actually trigger a harvest here and check the outcome?