mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
feat(operations): worker concurrency and job retention settings
This commit is contained in:
parent
18146c30a1
commit
34582d23f3
6 changed files with 94 additions and 1 deletions
13
operations/tests/test_conf.py
Normal file
13
operations/tests/test_conf.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from appsettings.models import AppSettings
|
||||
from operations import utils
|
||||
|
||||
|
||||
class ConfTestCase(TestCase):
|
||||
def test_defaults_and_bounds(self):
|
||||
self.assertEqual((utils.concurrency(), utils.retention_days()), (4, 30))
|
||||
AppSettings.objects.filter(key="WORKER_CONCURRENCY").update(value="99")
|
||||
self.assertEqual(utils.concurrency(), 4)
|
||||
AppSettings.objects.filter(key="WORKER_CONCURRENCY").update(value="8")
|
||||
self.assertEqual(utils.concurrency(), 8)
|
||||
Loading…
Add table
Add a link
Reference in a new issue