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

fix: DEV-1904: Fixed source storage duplicating tasks when double click Sync button #2915

Merged
merged 12 commits into from
Oct 28, 2022

Conversation

guilhermemachado26
Copy link
Contributor

Description of the proposed changes

Users are being able to click sync button as many times as they want.

In order to avoid running multiple sync jobs at the same time, as a first approach, we have decided to implement a method which checks if there is a sync job already in the queue for that specific project before start the sync.

Jira Ticket

https://heartex.atlassian.net/browse/DEV-1904

@guilhermemachado26 guilhermemachado26 self-assigned this Sep 8, 2022
@swarmia
Copy link

swarmia bot commented Sep 8, 2022

@github-actions github-actions bot added the fix label Sep 8, 2022
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Base: 77.42% // Head: 77.36% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (158b878) compared to base (572d0e7).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2915      +/-   ##
===========================================
- Coverage    77.42%   77.36%   -0.07%     
===========================================
  Files          146      146              
  Lines        10775    10791      +16     
===========================================
+ Hits          8343     8348       +5     
- Misses        2432     2443      +11     
Impacted Files Coverage Δ
label_studio/label_studio/core/redis.py 42.10% <0.00%> (-1.84%) ⬇️
...bel_studio/label_studio/io_storages/base_models.py 79.41% <0.00%> (-1.40%) ⬇️

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@makseq
Copy link
Member

makseq commented Sep 12, 2022

I would add simple test here where sync is called twice.

@guilhermemachado26 guilhermemachado26 marked this pull request as ready for review September 14, 2022 17:28
@guilhermemachado26 guilhermemachado26 marked this pull request as draft September 14, 2022 19:54
@guilhermemachado26 guilhermemachado26 marked this pull request as ready for review September 14, 2022 19:54
@niklub niklub merged commit 9d3bec5 into develop Oct 28, 2022
@github-actions github-actions bot deleted the fb-dev-1904 branch October 28, 2022 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants