-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactorisation + Intégration travail des perfs #155
Conversation
d913752
to
768b2ce
Compare
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.
Parfait ! Merci pour cette PR et pour l'intégration en avance de la PR des perfs !
750d2d3
to
0bb5c42
Compare
0bb5c42
to
f26768b
Compare
skip_newer_than=scheduled_export.frequency * 24 * 60, | ||
export_id=export_request.export.id, | ||
file_name=export_request.generate_file_name(), | ||
export_url=None, |
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.
Voir si on ne peut pas mettre la génération de export_url dans ExportRequest
|
||
return full_file_name | ||
def __init__(self, id_export, scheduled_export=None, user=None, format=None): |
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.
def __init__(self, id_export, scheduled_export=None, user=None, format=None): | |
def __init__(self, id_export, user=None, format=None): |
conf = current_app.config.get("EXPORTS") | ||
def generate_file_name(self): | ||
if self.file_name: | ||
return Path(self.export_dir) / self.file_name |
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’init
export=export, user=id_role, export_url=export_url, export_failed=True | ||
) | ||
raise exp | ||
notify_export_file_generated(export=export, user=id_role, export_url=export_url) |
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.
notify_export_file_generated(export=export, user=id_role, export_url=export_url) | |
else: | |
notify_export_file_generated(export=export, user=id_role, export_url=export_url) |
Refactorisation du module.
Suppression des paramètres de configs :
usr_generated_dirname
: chemin absolu ou relatif au dossier media du dossier où les exports à la demande des utilisateurs seront déposésexport_schedules_dir
: chemin absolu ou relatif au dossier media du dossier où les exports programmés seront déposésexport_web_url