-
Notifications
You must be signed in to change notification settings - Fork 7
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
oai config #3
oai config #3
Conversation
998d5f2
to
8946786
Compare
@@ -0,0 +1,18 @@ | |||
|
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.
missing copyright
rero_ebooks/config.py
Outdated
@@ -165,3 +167,12 @@ def _(x): | |||
|
|||
#: Switches off incept of redirects by Flask-DebugToolbar. | |||
DEBUG_TB_INTERCEPT_REDIRECTS = False | |||
|
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.
to be removed?
rero_ebooks/cli.py
Outdated
click.echo('record uuid: ' + str(record.id) + ' | ' + status) | ||
|
||
|
||
@click.group() |
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.
can be imported from invenio-oaiharvester?
@@ -0,0 +1,10 @@ | |||
VS: |
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.
copyright?
3 commits can be merged into one. |
9ae1801
to
3cf6665
Compare
Signed-off-by: Peter Weber <Peter.Weber@rero.ch> Co-authored-by: Bertrand Zuchuat <Bertrand.Zuchuat@rero.ch>
3cf6665
to
df566a0
Compare
rero_ebooks/cli.py
Outdated
from flask.cli import with_appcontext | ||
from invenio_oaiharvester.cli import harvest | ||
from invenio_records.cli import records | ||
|
||
from rero_ebooks.api import Ebook |
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.
relative import
rero_ebooks/cli.py
Outdated
from invenio_records.cli import records | ||
|
||
from rero_ebooks.api import Ebook | ||
from rero_ebooks.utils import add_oai_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.
relative import
rero_ebooks/tasks.py
Outdated
reindex=True | ||
) | ||
click.echo('record uuid: ' + str(rec.id) + ' | ' + status) | ||
# TODO bulk update and reindexing |
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.
to be removed?
rero_ebooks/tasks.py
Outdated
dbcommit=True, | ||
reindex=True | ||
) | ||
click.echo('record uuid: ' + str(rec.id) + ' | ' + status) |
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.
click does not makes sense when it is called from receiver!
configs could be added with:
invenio oaiharvester initconfig data/oaisources.yml
or with
invenio oaiharvester addsource VS https://mediatheque-valais.cantookstation.eu/oai.xml
Celery must be started for asynchrone harvesting:
celery worker --app invenio_app --loglevel INFO -B -E
Harvesting could be started with (-k asynchrone, -q quite):
invenio oaiharvester harvest -n VS -k -q
invenio oaiharvester harvest -n NJ -k -q