diff --git a/conf/solr_cron b/conf/solr_cron deleted file mode 100644 index 1cecaac7804..00000000000 --- a/conf/solr_cron +++ /dev/null @@ -1,7 +0,0 @@ -PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - - -#Updating Solr's trending scores. -0 * * * * su openlibrary "python scripts/calculate_trending_scores_hourly.py" - -5 0 * * * su openlibrary "python scripts/calculate_trending_scores_daily.py" diff --git a/openlibrary/solr/solr_types.py b/openlibrary/solr/solr_types.py index b953fa7018d..257903f4e04 100644 --- a/openlibrary/solr/solr_types.py +++ b/openlibrary/solr/solr_types.py @@ -1,8 +1,8 @@ # This file is auto-generated by types_generator.py # fmt: off - from typing import Literal, TypedDict, Optional + class SolrDocument(TypedDict): key: str type: Literal['work', 'author', 'subject'] @@ -123,3 +123,5 @@ class SolrDocument(TypedDict): lending_edition_s: Optional[str] ia_collection_s: Optional[str] ebook_count_i: Optional[int] + +# fmt: on diff --git a/openlibrary/solr/solr_updater_crons b/openlibrary/solr/solr_updater_crons deleted file mode 100644 index c97c0173561..00000000000 --- a/openlibrary/solr/solr_updater_crons +++ /dev/null @@ -1,17 +0,0 @@ - -PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -# At XX:05, check the counts of reading log events, and use them to -# update the trending count for 1) all works with a non-zero trending count -# and 2) all works with reading-log events in the last hour. - -05 * * * * su openlibrary -c "python /openlibrary/scripts/calculate_trending_scores_hourly.py" - -#At midnight each day, transfer the sum of the last 24 hours of trending scores to the appropriate 'daily' slot -#for each work. This once more affects: all works with a non-zero count for that day, or ones with a current -#sum of greater than zero for those 24 hours. - -0 0 * * * su openlibrary -c "python /openlibrary/scripts/calculate_trending_scores_daily.py" - -#Test command -* * * * * su openlibrary -c "python /openlibrary/scripts/test_scripts.py"