2021-01-04 09:35:31 +01:00
|
|
|
# Nexus Ingest
|
|
|
|
|
|
|
|
`Ingest` goes to Internet and send retrived data to Kafka queue of operations.
|
|
|
|
This version has cut `configs` subdirectory due to hard reliance of configs on the network infrastructure you are using.
|
|
|
|
You have to write your own configs taking example below into account.
|
|
|
|
|
|
|
|
## Sample `configs/base.yaml`
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
jobs:
|
|
|
|
crossref-api:
|
|
|
|
class: nexus.ingest.jobs.CrossrefApiJob
|
|
|
|
kwargs:
|
|
|
|
actions:
|
2022-09-02 17:44:56 +02:00
|
|
|
- class: nexus.actions.postgres.ToScimagPbAction
|
|
|
|
- class: nexus.actions.scimag_pb.ToDocumentOperationBytesAction
|
|
|
|
kwargs:
|
|
|
|
full_text_index: true
|
|
|
|
should_fill_from_external_source: true
|
2021-01-04 09:35:31 +01:00
|
|
|
base_url: https://api.crossref.org/
|
|
|
|
max_retries: 60
|
|
|
|
retry_delay: 10
|
|
|
|
sinks:
|
|
|
|
- class: nexus.ingest.sinks.KafkaSink
|
|
|
|
kwargs:
|
2022-09-02 17:44:56 +02:00
|
|
|
kafka:
|
|
|
|
bootstrap_servers:
|
|
|
|
- kafka-0.example.net
|
|
|
|
topic_name: operations_binary
|
2021-01-04 09:35:31 +01:00
|
|
|
libgen-api:
|
|
|
|
class: nexus.ingest.jobs.LibgenApiJob
|
|
|
|
kwargs:
|
|
|
|
actions:
|
2022-09-02 17:44:56 +02:00
|
|
|
- class: nexus.actions.libgen_api.ToScitechPbAction
|
|
|
|
- class: nexus.actions.scitech_pb.ToDocumentOperationBytesAction
|
|
|
|
kwargs:
|
|
|
|
full_text_index: true
|
|
|
|
should_fill_from_external_source: false
|
2021-01-04 09:35:31 +01:00
|
|
|
base_url: libgen.example.net
|
|
|
|
max_retries: 60
|
|
|
|
retry_delay: 10
|
|
|
|
sinks:
|
|
|
|
- class: nexus.ingest.sinks.KafkaSink
|
|
|
|
kwargs:
|
2022-09-02 17:44:56 +02:00
|
|
|
bootstrap_servers:
|
2021-01-04 09:35:31 +01:00
|
|
|
- kafka-0.example.net
|
|
|
|
topic_name: operations_binary
|
|
|
|
log_path: '/var/log/nexus-ingest/{{ ENV_TYPE }}'
|
|
|
|
```
|