mirror of
https://github.com/clearml/clearml-server
synced 2025-03-03 18:54:20 +00:00
Add explicit refresh interval to ES mappings
Fix queue tests
This commit is contained in:
parent
21ed8559bf
commit
74acaa31df
@ -1,8 +1,8 @@
|
||||
{
|
||||
"index_patterns": "events-*",
|
||||
"settings": {
|
||||
"number_of_shards": 1,
|
||||
"number_of_replicas": 0
|
||||
"number_of_replicas": 0,
|
||||
"number_of_shards": 1
|
||||
},
|
||||
"mappings": {
|
||||
"_source": {
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"index_patterns": "queue_metrics_*",
|
||||
"settings": {
|
||||
"number_of_shards": 1,
|
||||
"number_of_replicas": 0
|
||||
"number_of_replicas": 0,
|
||||
"number_of_shards": 1
|
||||
},
|
||||
"mappings": {
|
||||
"_source": {
|
||||
@ -20,6 +20,9 @@
|
||||
},
|
||||
"queue_length": {
|
||||
"type": "integer"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"index_patterns": "worker_stats_*",
|
||||
"settings": {
|
||||
"number_of_shards": 1,
|
||||
"number_of_replicas": 0
|
||||
"number_of_replicas": 0,
|
||||
"number_of_shards": 1
|
||||
},
|
||||
"mappings": {
|
||||
"_source": {
|
||||
@ -32,6 +32,9 @@
|
||||
},
|
||||
"task": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,10 @@ from apiserver.tests.automated import TestService, utc_now_tz_aware
|
||||
|
||||
|
||||
class TestQueues(TestService):
|
||||
def setUp(self, **kwargs):
|
||||
super().setUp(**kwargs)
|
||||
self.user = self.api.users.get_current_user().user
|
||||
|
||||
def test_default_queue(self):
|
||||
res = self.api.queues.get_default()
|
||||
self.assertIsNotNone(res.id)
|
||||
@ -313,4 +317,9 @@ class TestQueues(TestService):
|
||||
machine_stats=dict(cpu_usage=[10, 20]),
|
||||
task=task["id"],
|
||||
)
|
||||
return dict(name=worker, ip="127.0.0.1", task=task)
|
||||
return dict(
|
||||
name=worker,
|
||||
ip="127.0.0.1",
|
||||
task=task,
|
||||
key=f"worker_{self.user.company.id}_{self.user.id}_{worker}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user