WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

utils: resolve circular imports #157

@VMois

Description

@VMois

Originated in #156 (comment)

suggestion: In my opinion, circular imports indicate that the code in modes.py and utils.py is too coupled and requires reorganization.

Possible idea of how to split the code:

  • utils.py file with low-level functions that do not depend on anything from reana_db.models (e.g, build_workspace_path)

  • quotas.py file with functions that are built on top of DB models and low-level functions (e.g, update_workflow_cpu_quota)

  • move workflow_status_change_listener function from models.py to event_listeners.py

This will create a clear dependency path: utils.py => models.py => quotas.py => event_listeners.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions