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

Feature/#4 adding a cron job to refresh vocabularies #6

Merged

Conversation

jarno-knaw
Copy link
Contributor

Closes #4.

Add a cron container which loads vocabularies based on the yml files in the data directory every hour.

Also added a configuration option for using this feature for refreshing existing vocabularies:

config:
  refresh: Yes
  refreshInterval: 24 # Time in hours since last update
  type: fetch
  location: https://wherever-your-data-is/file.config

Omitting the refreshInterval but setting refresh to True results in refreshing every hour or when the container is restarted, as the interval is set to 0 hours.

@jarno-knaw jarno-knaw linked an issue Aug 1, 2024 that may be closed by this pull request
Copy link
Contributor

@menzowindhouwer menzowindhouwer left a comment

Choose a reason for hiding this comment

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

SPARQLWrapper looks nice :-)

Copy link
Contributor

@menzowindhouwer menzowindhouwer left a comment

Choose a reason for hiding this comment

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

some other cron approaches, e.g. in TB2, left me with the impression that cron in docker was complicated, nice to see that it doesn't have to be ...

Copy link
Contributor

@menzowindhouwer menzowindhouwer left a comment

Choose a reason for hiding this comment

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

Why do we need a sleep of 10? can we somehow detect if the event happened that we're waiting on?

@menzowindhouwer menzowindhouwer merged commit 47de985 into main Sep 9, 2024
2 checks passed
@menzowindhouwer menzowindhouwer deleted the feature/4-adding-a-cron-job-to-refresh-vocabularies branch September 9, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adding a cron job to refresh vocabularies
2 participants