Feature #8095
closed
Add an ability to disable safe marks
Added by Evgeny Novikov over 7 years ago.
Updated over 7 years ago.
Description
Most likely safe marks aren't required for verification jobs and their absence allows to considerably optimize various operations, say, uploading verification job archives. But sometimes, e.g. for validation jobs, they can be useful. In branch disable-safe-marks safe marks are disabled globally. It is required to have an ability to enable safe marks for particular verification jobs. Such the enabling should cause corresponding caches recalculation.
- Due date set to 04/19/2017
- Status changed from New to Resolved
- % Done changed from 0 to 100
Done (in 'disable-safe-marks').
- Status changed from Resolved to Open
I found out that a safe mark associations cache isn't recalculated when I enabled safe marks for a job. I noticed that because of I had 2 similar jobs for which I created 1 safe mark successfully associated with 1 safe report from each job. After disabling and enabling safe marks for one of them later I didn't get back a corresponding association.
Sorry, the last commit introduces the bug. It's easy and fast to fix it, but I can't do it right now due to a lot of uncommited changes in another branch.
Also I would like to disable safe marks both when a new job is created on the basis of another one and after first and any other database populations. Actually safe marks will be required quite seldom.
The bug was fixed. If you don't want to disable safe marks of each job you can do in python shell:
from jobs.models import Job
Job.objects.all().update(safe_marks=False)
from tools.utils import disable_safe_marks_for_job
for job in Job.objects.all(): disable_safe_marks_for_job(job)
Now I'm starting the develop of super-fast safe marks assosiations recalculations in this branch. So it will be better to wait it. But please don't touch branch "job-weight" before disable-safe-marks will be merged to master.
Evgeny Novikov wrote:
Also I would like to disable safe marks both when a new job is created on the basis of another one and after first and any other database populations. Actually safe marks will be required quite seldom.
You can enable or disable safe marks on creation job page. Population creates jobs with safe marks option set to value of ENABLE_SAFE_MARKS (in common.py).
Vladimir Gratinskiy wrote:
Evgeny Novikov wrote:
Also I would like to disable safe marks both when a new job is created on the basis of another one and after first and any other database populations. Actually safe marks will be required quite seldom.
You can enable or disable safe marks on creation job page. Population creates jobs with safe marks option set to value of ENABLE_SAFE_MARKS (in common.py).
Regarding the first part of your message I will open one more issue for more expected behavior when copying verification jobs. I advice to set ENABLE_SAFE_MARKS to false by default for all configurations.
Evgeny Novikov wrote:
Vladimir Gratinskiy wrote:
Evgeny Novikov wrote:
Also I would like to disable safe marks both when a new job is created on the basis of another one and after first and any other database populations. Actually safe marks will be required quite seldom.
You can enable or disable safe marks on creation job page. Population creates jobs with safe marks option set to value of ENABLE_SAFE_MARKS (in common.py).
Regarding the first part of your message I will open one more issue for more expected behavior when copying verification jobs. I advice to set ENABLE_SAFE_MARKS to false by default for all configurations.
It is set by default the same as for parent job and you can easily change it by one click on checkbox on creation job page. ENABLE_SAFE_MARKS is False already. But it is used for populated jobs only.
- Status changed from Open to Closed
Everything was implemented and fixed, so I merged the branch to master in 8064b7fa.
I forgot to add that everybody will have to migrate their local databases after this update.
Also available in: Atom
PDF