improve actor run script

This commit is contained in:
timurgordon
2025-02-03 14:59:19 +01:00
parent 1db2c3ee54
commit af2f33d4f6
2 changed files with 16 additions and 3 deletions

View File

@@ -21,3 +21,5 @@ actor_module.write(example_dir,
format: true
overwrite: true
)!
os.execvp('bash', ['${example_dir}/meeting_scheduler_actor/scripts/run.sh'])!

View File

@@ -4,13 +4,24 @@ DIR="@{dollar}(cd "@{dollar}(dirname "@{dollar}{BASH_SOURCE[0]}")" && pwd)"
echo "@{dollar}DIR"
chmod +x @{dollar}{DIR}/run_actor.vsh
@{dollar}{DIR}/run_actor.vsh
@{dollar}{DIR}/run_actor.vsh > /dev/null 2>&1 &
ACTOR_PID=@{dollar}!
chmod +x @{dollar}{DIR}/run_http_server.vsh
@{dollar}{DIR}/run_http_server.vsh
@{dollar}{DIR}/run_http_server.vsh > /dev/null 2>&1 &
HTTP_SERVER_PID=@{dollar}!
# Print desired output
echo "Actor Redis Interface running on redis://localhost:6379"
echo "* /queues/${actor_name} -> Action Interface"
echo ""
echo "Actor HTTP Server running on http://localhost:8080"
echo "* /playground/openapi -> OpenAPI Playground"
echo "* /openapi -> OpenAPI Interface"
echo "* /docs -> Documentation"
echo ""
# Function to clean up when script is killed
cleanup() {
echo "Stopping background processes..."