Skip to content

Commit

Permalink
Sandbox Process Creation
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeebot[bot] authored Dec 21, 2024
1 parent e72f079 commit 4776d3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers = [

[tool.poetry.dependencies]
python = ">=3.11,<3.13"
security = "==1.3.1"

[tool.poetry.dev-dependencies]
pre-commit = "^3.7.1"
Expand Down
3 changes: 2 additions & 1 deletion spiffworkflow-backend/bin/load_test_message_start_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import subprocess
import sys
from security import safe_command


def get_access_token(script_dir, username="admin", password="admin", realm_name="spiffworkflow"):
Expand All @@ -23,7 +24,7 @@ def run_curl_command(message_identifier, access_token, backend_base_url):
try:
# Login command
login_cmd = f"curl --silent -X POST '{backend_base_url}/v1.0/login_with_access_token?access_token={access_token}' -H 'Authorization: Bearer {access_token}' >/dev/null"
subprocess.run(login_cmd, shell=True, check=True)
safe_command.run(subprocess.run, login_cmd, shell=True, check=True)

# Message sending command
message_cmd = f"curl --silent -X POST '{backend_base_url}/v1.0/messages/{message_identifier}?execution_mode=asynchronous' -H 'Authorization: Bearer {access_token}' -d '{{\"payload\": {{\"email\": \"[email protected]\"}}}}' -H 'Content-type: application/json'"
Expand Down

0 comments on commit 4776d3f

Please sign in to comment.