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

Set project as busy / not busy when uploading (1) #525

Conversation

i-oden
Copy link
Member

@i-oden i-oden commented Sep 7, 2022

Description

After authenticating, before starting the upload, set the project as busy. When the upload is done, set as not busy again.

The cleanup_busy_status is placed in both the __init__ and the __exit__ because the code does not enter the __exit__ method if there's an exception during the initation of the DataPutter object.

Should be tested with this PR

  • Summary of the changes and the related issue
  • Relevant motivation and context
  • Any dependencies that are required for this change

Fixes DDS-1331

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

Please delete options that are not relevant.

  • Any dependent changes have been merged and published in downstream modules
  • Rebase/merge the branch which this PR is made to
  • Product Owner / Scrum Master: This PR is made to the master branch and I have updated the version
  • I am bumping the major version (e.g. 1.x.x to 2.x.x) and I have made the corresponding changes to the API version

Formatting and documentation

  • I have added a row in the changelog
  • The code follows the style guidelines of this project: Black / Prettier formatting
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Tests

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

dds_cli/custom_decorators.py Outdated Show resolved Hide resolved
dds_cli/data_putter.py Outdated Show resolved Hide resolved
dds_cli/data_putter.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #525 (f553f12) into dev (713df9b) will decrease coverage by 0.17%.
The diff coverage is 12.12%.

@@            Coverage Diff             @@
##              dev     #525      +/-   ##
==========================================
- Coverage   42.31%   42.14%   -0.18%     
==========================================
  Files          29       29              
  Lines        2595     2615      +20     
==========================================
+ Hits         1098     1102       +4     
- Misses       1497     1513      +16     
Impacted Files Coverage Δ
dds_cli/data_putter.py 21.52% <0.00%> (-1.27%) ⬇️
dds_cli/base.py 40.70% <27.27%> (-1.45%) ⬇️
dds_cli/__init__.py 91.02% <100.00%> (+0.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dds_cli/exceptions.py Outdated Show resolved Hide resolved
@i-oden i-oden requested a review from valyo September 8, 2022 06:52
@i-oden i-oden self-assigned this Sep 8, 2022
@i-oden i-oden mentioned this pull request Sep 8, 2022
19 tasks
@i-oden i-oden marked this pull request as draft September 8, 2022 07:35
@i-oden i-oden marked this pull request as ready for review September 8, 2022 07:48
@i-oden i-oden changed the title Set project as busy / not busy when uploading Set project as busy / not busy when uploading (1) Sep 8, 2022
Copy link
Member

@valyo valyo left a comment

Choose a reason for hiding this comment

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

Works as expected and looks fine.

@i-oden i-oden merged commit 2697089 into dev Sep 9, 2022
@i-oden i-oden deleted the DDS-1331-set-project-as-busy-when-starting-upload-not-busy-when-done branch September 9, 2022 10:04
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.

None yet

2 participants