Thanks for the reply, and for sure
Please help, Im lost lol
Code Flow:
1. Launch.sh (Sets Env)
a. Entrypoint.py
i. Registration.py
1. Tasks.py
tasks.py:
with Flow('AutomoxSyncOrginizations', executor=LocalDaskExecutor(), schedule=automox_sync_orgs_schedule) as automox_sync_orgs:
x= dummy()
Registration.py:
def register(schedule=True):
automox_sync_orgs.run_config = run_config
automox_sync_orgs.register(
project_name=os.getenv("RELEASE").lower(),
labels=["REACTOR", "AUTOMOX"],
set_schedule_active=schedule,
add_default_labels=False,
idempotency_key=automox_sync_orgs.serialized_hash()
)
Agent in entry.py:
############################
# TASK IMPORTS BELOW
############################
import automox.registration
############################
# REGISTER FLOWS BELOW
############################
print(f"[+] About to Register Flow - {os.getenv('RELEASE').lower()}")
automox.registration.register(schedule=True)
print("[+] DONE Registering Flow")
############################
# LAUNCH AGENT BELOW
##########################
LocalAgent(labels=["REACTOR","AUTOMOX"], hostname_label=False, name=os.getenv("HOSTNAME"), import_paths=["/code"]).start()
Launch.sh:
#!/bin/bash
cd /code
export PYTHONPATH="/code"
export PATH="${PATH}:/code"
echo $PATH
echo $PYTHONPATH
python /code/entrypoint.py