-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Splitted default queue to import/export, fixed django-rq admin page #5555
Conversation
a8a6287
to
7fe6555
Compare
cvat/apps/engine/backup.py
Outdated
queue = django_rq.get_queue("default") | ||
rq_id = "/api/{}s/{}/backup".format(filename_prefix, db_instance.pk) | ||
queue = django_rq.get_queue(queue_name) | ||
rq_id = f"api-{filename_prefix}s-{db_instance.pk}/backup" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-backup?
cvat/apps/engine/backup.py
Outdated
if 'rq_id' in request.data: | ||
rq_id = request.data['rq_id'] | ||
else: | ||
rq_id = "{}@/api/projects/{}/import".format(request.user, uuid.uuid4()) | ||
rq_id = f"{request.user}$-api-projects-{uuid.uuid4()}-import" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is $
typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will recommend to think about more readable names: import~project.{uuid.uuid4()}-by-{request.user.username}
cvat/apps/engine/backup.py
Outdated
if 'rq_id' in request.data: | ||
rq_id = request.data['rq_id'] | ||
else: | ||
rq_id = "{}@/api/tasks/{}/import".format(request.user, uuid.uuid4()) | ||
rq_id = f"{request.user}$-api-tasks-{uuid.uuid4()}-import" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@
meant in
. I see no value in $
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import~task.{uuid.uuid4()}-by-{request.user.username}
cvat/apps/engine/mixins.py
Outdated
@@ -259,7 +259,7 @@ def export_annotations(self, request, pk, db_obj, export_func, callback, get_dat | |||
field_name=StorageType.TARGET, | |||
) | |||
|
|||
rq_id = "/api/{}/{}/annotations/{}".format(self._object.__class__.__name__.lower(), pk, format_name) | |||
rq_id = f"api-{self._object.__class__.__name__.lower()}-{pk}-annotations-{format_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export~annotations-for-{self._object.__class__.__name__.lower()}.id{pk}-in-{format_name}-format
cvat/apps/engine/task.py
Outdated
q.enqueue_call(func=_create_thread, args=(tid, data), | ||
job_id="/api/tasks/{}".format(tid)) | ||
job_id=f"api-tasks-{tid}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create~task.id{tid}-by-{username}
supervisord/worker.annotation.conf
Outdated
@@ -24,15 +24,8 @@ autorestart=true | |||
|
|||
[program:rqworker_low] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rqworker_annotation for consistency?
supervisord/worker.export.conf
Outdated
priority=1 | ||
autorestart=true | ||
|
||
[program:rqworker_default] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rqworker_export?
supervisord/worker.export.conf
Outdated
" | ||
environment=SSH_AUTH_SOCK="/tmp/ssh-agent.sock" | ||
numprocs=%(ENV_NUMPROCS)s | ||
process_name=rqworker_default_%(process_num)s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rqworker_export_?
9d25b18
to
2e00feb
Compare
@azhavoro there is a reference to cvat_worker_default in the docs share path example. See https://opencv.github.io/cvat/docs/administration/basics/installation/#share-path How should I adjust that in my override file after this PR? Do I use cvat_worker_import or something else? |
Motivation and context
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.