-
Notifications
You must be signed in to change notification settings - Fork 4
Split fetch and parse for jobs #324
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
base: master
Are you sure you want to change the base?
Conversation
sarc/core/scraping/jobs.py
Outdated
| value=get_jobs(clusters[cluster_name], time_from, time_to)) | ||
|
|
||
| if auto_interval is not None: | ||
| set_auto_end_time(cluster_name, auto_end_field, time_to) |
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.
Préfère-t-on appeler set_auto_end_time lors du parse ?
sarc/cli/parse/jobs.py
Outdated
| clusters_cfg = config("scraping").clusters | ||
| assert clusters_cfg is not None | ||
|
|
||
| parse_jobs(self.cluster_names, clusters_cfg, self.from_) |
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.
L'ajout à MongoDB se fait pour l'instant dans la fonction parse_jobs. Préfère-t-on le faire directement ici (avec un parse_jobs qui retourne une liste de jobs) ?
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.
Je crois que c'est bien correct avec un parse_jobs.
|
|
||
| def execute(self) -> int: | ||
|
|
||
| clusters_cfg = config("scraping").clusters |
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.
Ici, clusters_cfg est récupéré à partir " config("scraping"). Souhaite-t-on faire un fichier de configuration pour le parsing ?
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.
C'est quelque chose auquel je réfléchis, mais pour cette PR on peut laisser comme ça.
Uh oh!
There was an error while loading. Please reload this page.