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

Refactorisation + Intégration travail des perfs #155

Merged
merged 2 commits into from
May 12, 2023

Conversation

amandine-sahl
Copy link
Contributor

@amandine-sahl amandine-sahl commented May 11, 2023

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és
  • export_schedules_dir : chemin absolu ou relatif au dossier media du dossier où les exports programmés seront déposés
  • export_web_url

@amandine-sahl amandine-sahl force-pushed the workshop_filename_generation branch 3 times, most recently from d913752 to 768b2ce Compare May 11, 2023 19:21
Copy link
Collaborator

@mvergez mvergez left a 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 !

backend/gn_module_export/commands.py Outdated Show resolved Hide resolved
backend/gn_module_export/commands.py Show resolved Hide resolved
backend/gn_module_export/utils_export.py Outdated Show resolved Hide resolved
backend/gn_module_export/utils_export.py Outdated Show resolved Hide resolved
backend/gn_module_export/utils_export.py Outdated Show resolved Hide resolved
backend/gn_module_export/utils_export.py Outdated Show resolved Hide resolved
backend/gn_module_export/blueprint.py Show resolved Hide resolved
backend/gn_module_export/tasks.py Show resolved Hide resolved
backend/gn_module_export/tasks.py Show resolved Hide resolved
@amandine-sahl amandine-sahl force-pushed the workshop_filename_generation branch 2 times, most recently from 750d2d3 to 0bb5c42 Compare May 12, 2023 09:13
@amandine-sahl amandine-sahl force-pushed the workshop_filename_generation branch from 0bb5c42 to f26768b Compare May 12, 2023 09:16
@amandine-sahl amandine-sahl requested a review from bouttier May 12, 2023 09:17
skip_newer_than=scheduled_export.frequency * 24 * 60,
export_id=export_request.export.id,
file_name=export_request.generate_file_name(),
export_url=None,
Copy link
Contributor

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):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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)

@amandine-sahl amandine-sahl merged commit 4bccde7 into workshop May 12, 2023
@camillemonchicourt camillemonchicourt deleted the workshop_filename_generation branch May 16, 2023 15:42
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.

3 participants