This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,19 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
123
123
pip install -e " .[dev]"
124
124
```
125
125
126
+ ### Running locally with several network interfaces
127
+
128
+ By default weaviate is picking the default route as the ip for the cluster nodes. It may cause
129
+ some issues when dealing with multiple interfaces. To make it work, localhost needs to be the
130
+ default route:
131
+
132
+ ``` bash
133
+ sudo route delete default
134
+ sudo route add default 127.0.0.1
135
+ sudo route add -net 0.0.0.0/1 < public_ip_gateway>
136
+ sudo route add -net 128.0.0.0/1 < public_ip_gateway>
137
+ ```
138
+
126
139
### Testing
127
140
``` bash
128
141
pytest
Original file line number Diff line number Diff line change 3
3
import os
4
4
import shutil
5
5
6
+
6
7
import weaviate
7
8
from weaviate .classes .config import DataType , Property
8
9
from weaviate .embedded import EmbeddedOptions
@@ -53,11 +54,14 @@ def take_backup(self):
53
54
shutil .rmtree (backup_path )
54
55
55
56
# take a backup of the data
56
- self .client .backup .create (
57
- backup_id = os .getenv ("BACKUP_TARGET_ID" , "backup" ),
58
- backend = "filesystem" ,
59
- wait_for_completion = True ,
60
- )
57
+ try :
58
+ self .client .backup .create (
59
+ backup_id = os .getenv ("BACKUP_TARGET_ID" , "backup" ),
60
+ backend = "filesystem" ,
61
+ wait_for_completion = True ,
62
+ )
63
+ except Exception as e :
64
+ print (f"Failed to take backup: { e } " )
61
65
62
66
def setup_schema (self ):
63
67
if not self .client .collections .exists ("Package" ):
You can’t perform that action at this time.
0 commit comments