Skip to content

Commit

Permalink
logging fix and attempt at import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud956 committed Oct 9, 2023
1 parent 4f85647 commit 6209b9b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
from datetime import datetime
from os.path import dirname, abspath
from rechtspraak_citations_extractor import get_citations
from rechtspraak_citations_extractor.citations_extractor import get_citations
import rechtspraak_extractor as rex
from airflow.models.variable import Variable
from dotenv import load_dotenv, find_dotenv
Expand Down Expand Up @@ -118,7 +118,7 @@ def rechtspraak_extract(args=None):
logging.info(f"Downloading {amount if amount else 'all'} Rechtspraak documents")

if not amount:
amount = 1200000
amount = 12

if start and end:
logging.info(f'Starting from manually specified dates: {start} - {end}')
Expand All @@ -130,6 +130,7 @@ def rechtspraak_extract(args=None):
metadata_df = rex.get_rechtspraak_metadata(save_file='n', dataframe=base_extraction)
elif start:
logging.info(f'Starting from manually specified date: {start} ')
amount = 100
base_extraction = rex.get_rechtspraak(max_ecli=amount, sd=start, save_file='n')
metadata_df = rex.get_rechtspraak_metadata(save_file='n', dataframe=base_extraction)
else:
Expand All @@ -146,7 +147,7 @@ def rechtspraak_extract(args=None):

end_time = time.time()
logging.info("--- DONE ---")
logging.info("Time taken: ", time.strftime('%H:%M:%S', time.gmtime(end_time - start_time)))
logging.info("Time taken: " + time.strftime('%H:%M:%S', time.gmtime(end_time - start_time)))
Variable.set(key='RSPRAAK_LAST_DATE', value=today_date)
if RS_SETUP:
Variable.set(key='RS_SETUP_INDEX', value=next_index)
Expand Down

0 comments on commit 6209b9b

Please sign in to comment.