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

Add ability to limit one user to one task at a time #6975

Merged
merged 47 commits into from
Oct 29, 2023

Conversation

Marishka17
Copy link
Contributor

@Marishka17 Marishka17 commented Oct 10, 2023

Motivation and context

Added ability to limit a user to one active rq job at a time.
Migrated to rq 1.15.1.

How has this been tested?

Manually + REST API test that will be in another PR

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
    - [ ] I have updated the documentation accordingly
    - [ ] I have added tests to cover my changes
    - [ ] I have linked related issues (see GitHub docs)
    - [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@Marishka17 Marishka17 requested a review from azhavoro as a code owner October 10, 2023 22:20
@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2023

❌ Some checks failed
📄 See logs here

@Marishka17 Marishka17 changed the title [WIP] Add ability to limit one user to one task at a time Add ability to limit one user to one task at a time Oct 13, 2023
@Marishka17 Marishka17 requested a review from nmanovic as a code owner October 23, 2023 11:32
@@ -174,6 +174,7 @@ jobs:
COVERAGE_PROCESS_START: ".coveragerc"
run: |
pytest tests/python/ --cov --cov-report=json
pytest tests/python/rest_api/test_rq_job_dependencies.py --rebuild --adjusted-server-conf --cov --cov-report=json
Copy link
Contributor

Choose a reason for hiding this comment

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

I expect something like

ONE_RUNNING_JOB_IN_QUEUE_PER_USER=true pytest tests/python/rest_api/test_rq_job_dependencies.py --rebuild --cov --cov-report=json

Need to check. I hope it will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we still need to override some settings in docker compose file, I'd rather to leave ONE_RUNNING_JOB_IN_QUEUE_PER_USER there

@@ -370,23 +376,27 @@ def session_start(
rebuild = session.config.getoption("--rebuild")
cleanup = session.config.getoption("--cleanup")
dumpdb = session.config.getoption("--dumpdb")
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope you don't need changes in the file.

@Marishka17
Copy link
Contributor Author

@nmanovic, @zhiltsov-max, Do you have any other comments?

@nmanovic nmanovic merged commit fc47f58 into develop Oct 29, 2023
33 checks passed
@nmanovic nmanovic deleted the mk/limit_one_user_to_one_task_at_a_time branch October 29, 2023 13:22
@cvat-bot cvat-bot bot mentioned this pull request Nov 3, 2023
@Marishka17 Marishka17 restored the mk/limit_one_user_to_one_task_at_a_time branch November 14, 2023 17:16
@Marishka17 Marishka17 deleted the mk/limit_one_user_to_one_task_at_a_time branch November 14, 2023 17:19
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