File size: 1,291 Bytes
6c50d1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
47
48
49
50
51
52
53
54
55
#!/bin/bash
#./run_all_services.sh to run all services
# Define list of services
declare -a services=(
  "fdic"
  "genome-nexus"
#   "language-tool"
#   "ocvn"
  "ohsome"
  "omdb"
  "rest-countries"
  "spotify"
  "youtube"
)

# Loop over the services array
for service in "${services[@]}"
do
  echo "Starting service: $service"
  
  # Navigate to the services directory and start the service
  cd services
  if python3 run_service_arm.py "$service" no_token; then
    echo "Service $service started successfully."
  else
    echo "Failed to start service $service."
    cd ..
    continue  # Skip the rest of the loop and proceed with the next service
  fi
  cd ..

  # Give some time for the service to start up properly
  sleep 5  # Adjust this time as needed

  echo "Running request generator for: $service"
  
  # Navigate to the baseline directory and run the request generator
  cd src
  if python3 request_generator.py "$service"; then
    echo "Request generator for $service completed successfully."
  else
    echo "Request generator for $service failed."
    # No need to continue here as it's the end of the loop body
  fi
  cd ..

  # Give some time for the request generator to finish
  sleep 10  # Adjust this time as needed


done

echo "All services have been processed."