-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose-init.sh
More file actions
executable file
·46 lines (40 loc) · 1.79 KB
/
docker-compose-init.sh
File metadata and controls
executable file
·46 lines (40 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
checkExists () {
# see https://github.com/temporalio/temporal/issues/4160
if temporal operator search-attribute list | grep -q "$1"; then
return 0
else
return 1
fi
}
echo "now trying to register iWF system search attributes..."
for run in {1..120}; do
sleep 1
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
sleep 0.1
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
sleep 0.1
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
sleep 0.1
temporal operator search-attribute create --name CustomKeywordField --type Keyword
sleep 0.1
temporal operator search-attribute create --name CustomIntField --type Int
sleep 0.1
temporal operator search-attribute create --name CustomBoolField --type Bool
sleep 0.1
temporal operator search-attribute create --name CustomDoubleField --type Double
sleep 0.1
temporal operator search-attribute create --name CustomDatetimeField --type Datetime
sleep 0.1
temporal operator search-attribute create --name CustomStringField --type Text
sleep 0.1
temporal operator search-attribute create --name CustomKeywordArrayField --type KeywordList
sleep 0.1
temporal operator search-attribute create --name CustomTextField --type Text
sleep 0.1
if checkExists "IwfWorkflowType" && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField" && checkExists "CustomKeywordArrayField"; then
echo "All search attributes are registered"
break
fi
done
tail -f /dev/null