From 2f8ac7650e99ef4ac48e332a8fe663654b2898c9 Mon Sep 17 00:00:00 2001 From: Tyler Burton Date: Thu, 2 May 2024 14:31:23 -0500 Subject: [PATCH 1/5] initial pass at working load manager --- .gitignore | 9 +- app/__init__.py | 7 +- app/scripts/load_manager.py | 59 ++ database/interface.py | 87 +-- harvester/utils.py | 2 - tests/data/cf_tasks_output.json | 1178 +++++++++++++++++++++++++++++++ 6 files changed, 1270 insertions(+), 72 deletions(-) create mode 100644 app/scripts/load_manager.py create mode 100644 tests/data/cf_tasks_output.json diff --git a/.gitignore b/.gitignore index 8c37ca7b..23fb528c 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,10 @@ node_modules/ # openstack ( s3 mock ) tmp/ -# vscode debugger -.vscode/* -!.vscode/launch.json -.env +# env +.env.secret requirements.txt +# vscode debugger +.vscode/* +!.vscode/launch.json \ No newline at end of file diff --git a/app/__init__.py b/app/__init__.py index 998d0c12..5633a245 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -6,14 +6,12 @@ from flask_migrate import Migrate from database.models import db +from app.scripts.load_manager import load_manager load_dotenv() -DATABASE_URI = os.getenv("DATABASE_URI") - def create_app(testing=False): - app = Flask(__name__, static_url_path="", static_folder="static") if testing: @@ -35,4 +33,7 @@ def create_app(testing=False): register_routes(app) + with app.app_context(): + load_manager() + return app diff --git a/app/scripts/load_manager.py b/app/scripts/load_manager.py new file mode 100644 index 00000000..0027af22 --- /dev/null +++ b/app/scripts/load_manager.py @@ -0,0 +1,59 @@ +import os +from app.interface import HarvesterDBInterface +from harvester.utils import CFHandler + +DATABASE_URI = os.getenv("DATABASE_URI") + +interface = HarvesterDBInterface() +cf_handler = CFHandler() + +MAX_JOBS_COUNT = 3 +APP_GUID = "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" # TODO: TEMP + + +def create_task(jobId): + return { + "app_guuid": APP_GUID, + "command": f"python harvest.py {jobId}", + "task_id": f"harvest-job-{jobId}", + } + + +def load_manager(): + # confirm CF_INSTANCE_INDEX == 0 or bail + + # filter harvestjobs by pending / pending_manual + jobs = interface.get_harvest_jobs_by_filter_multival( + "status", ["pending", "pending_manual"] + ) + print("db jobs") + print(jobs) + + # get current list of all tasks + current_tasks = cf_handler.get_all_app_tasks(APP_GUID) + + # filter out in_process tasks + running_tasks = cf_handler.get_all_running_tasks(current_tasks) + + # confirm tasks < MAX_JOBS_COUNT or bail + if MAX_JOBS_COUNT < running_tasks: + return + else: + slots = MAX_JOBS_COUNT - running_tasks + + # sort jobs by pending_manual first + jobs.sort(key=lambda x: x["status"], reverse=True) + + # slice off jobs to invoke + jobs_to_invoke = jobs[:slots] + + # invoke cf_task with next job(s) + # THEN mark that job(s) as running in the DB + for job in jobs_to_invoke: + task_contract = create_task(job["id"]) + print("task_contract") + print(task_contract) + task_status = cf_handler.start_task(**task_contract) + print("task_status") + print(task_status) + interface.update_harvest_job(job["id"], {"status": "in_progress"}) diff --git a/database/interface.py b/database/interface.py index f8dea785..b4f65217 100644 --- a/database/interface.py +++ b/database/interface.py @@ -1,4 +1,5 @@ -from sqlalchemy import create_engine, inspect +import os +from sqlalchemy import create_engine, inspect, or_ from sqlalchemy.exc import NoResultFound from sqlalchemy.orm import scoped_session, sessionmaker @@ -10,7 +11,7 @@ Organization, ) -from . import DATABASE_URI +DATABASE_URI = os.getenv("DATABASE_URI") class HarvesterDBInterface: @@ -32,6 +33,8 @@ def __init__(self, session=None): @staticmethod def _to_dict(obj): + if obj is None: + return None return {c.key: getattr(obj, c.key) for c in inspect(obj).mapper.column_attrs} def add_organization(self, org_data): @@ -48,16 +51,10 @@ def add_organization(self, org_data): def get_all_organizations(self): orgs = self.db.query(Organization).all() - if orgs is None: - return None - else: - orgs_data = [HarvesterDBInterface._to_dict(org) for org in orgs] - return orgs_data + return [HarvesterDBInterface._to_dict(org) for org in orgs] def get_organization(self, org_id): result = self.db.query(Organization).filter_by(id=org_id).first() - if result is None: - return None return HarvesterDBInterface._to_dict(result) def update_organization(self, org_id, updates): @@ -99,31 +96,17 @@ def add_harvest_source(self, source_data): def get_all_harvest_sources(self): harvest_sources = self.db.query(HarvestSource).all() - if harvest_sources is None: - return None - else: - harvest_sources_data = [ - HarvesterDBInterface._to_dict(source) for source in harvest_sources - ] - return harvest_sources_data + return [HarvesterDBInterface._to_dict(source) for source in harvest_sources] def get_harvest_source(self, source_id): result = self.db.query(HarvestSource).filter_by(id=source_id).first() - if result is None: - return None return HarvesterDBInterface._to_dict(result) def get_harvest_source_by_org(self, org_id): harvest_source = ( self.db.query(HarvestSource).filter_by(organization_id=org_id).all() ) - if harvest_source is None: - return None - else: - harvest_source_data = [ - HarvesterDBInterface._to_dict(src) for src in harvest_source - ] - return harvest_source_data + return [HarvesterDBInterface._to_dict(src) for src in harvest_source] def update_harvest_source(self, source_id, updates): try: @@ -164,21 +147,24 @@ def add_harvest_job(self, job_data): def get_harvest_job(self, job_id): result = self.db.query(HarvestJob).filter_by(id=job_id).first() - if result is None: - return None return HarvesterDBInterface._to_dict(result) + def get_harvest_jobs_by_filter(self, filter): + harvest_jobs = self.db.query(HarvestJob).filter_by(**filter).all() + harvest_jobs_data = [HarvesterDBInterface._to_dict(job) for job in harvest_jobs] + return harvest_jobs_data + + def get_harvest_jobs_by_filter_multival(self, attr, values): + query_list = [getattr(HarvestJob, attr) == value for value in values] + harvest_jobs = self.db.query(HarvestJob).filter(or_(*query_list)).all() + harvest_jobs_data = [HarvesterDBInterface._to_dict(job) for job in harvest_jobs] + return harvest_jobs_data + def get_harvest_job_by_source(self, source_id): harvest_job = ( self.db.query(HarvestJob).filter_by(harvest_source_id=source_id).all() ) - if harvest_job is None: - return None - else: - harvest_job_data = [ - HarvesterDBInterface._to_dict(job) for job in harvest_job - ] - return harvest_job_data + return [HarvesterDBInterface._to_dict(job) for job in harvest_job] def update_harvest_job(self, job_id, updates): try: @@ -219,19 +205,11 @@ def add_harvest_error(self, error_data): def get_harvest_error(self, error_id): result = self.db.query(HarvestError).filter_by(id=error_id).first() - if result is None: - return None return HarvesterDBInterface._to_dict(result) def get_harvest_error_by_job(self, job_id): harvest_errors = self.db.query(HarvestError).filter_by(harvest_job_id=job_id) - if harvest_errors is None: - return None - else: - harvest_errors_data = [ - HarvesterDBInterface._to_dict(err) for err in harvest_errors - ] - return harvest_errors_data + return [HarvesterDBInterface._to_dict(err) for err in harvest_errors] def add_harvest_record(self, record_data): try: @@ -264,38 +242,21 @@ def add_harvest_records(self, records_data: list) -> bool: def get_harvest_record(self, record_id): result = self.db.query(HarvestRecord).filter_by(id=record_id).first() - if result is None: - return None return HarvesterDBInterface._to_dict(result) def get_harvest_record_by_job(self, job_id): harvest_records = self.db.query(HarvestRecord).filter_by(harvest_job_id=job_id) - if harvest_records is None: - return None - else: - harvest_records_data = [ - HarvesterDBInterface._to_dict(rcd) for rcd in harvest_records - ] - return harvest_records_data + return [HarvesterDBInterface._to_dict(rcd) for rcd in harvest_records] def get_harvest_record_by_source(self, source_id): harvest_records = self.db.query(HarvestRecord).filter_by( harvest_source_id=source_id ) - if harvest_records is None: - return None - else: - harvest_records_data = [ - HarvesterDBInterface._to_dict(rcd) for rcd in harvest_records - ] - return harvest_records_data + return [HarvesterDBInterface._to_dict(rcd) for rcd in harvest_records] def get_source_by_jobid(self, jobid): harvest_job = self.db.query(HarvestJob).filter_by(id=jobid).first() - if harvest_job is None: - return None - else: - return HarvesterDBInterface._to_dict(harvest_job.source) + return HarvesterDBInterface._to_dict(harvest_job.source) def close(self): if hasattr(self.db, "remove"): diff --git a/harvester/utils.py b/harvester/utils.py index 99d311b2..d85589ac 100644 --- a/harvester/utils.py +++ b/harvester/utils.py @@ -20,7 +20,6 @@ def get_title_from_fgdc(xml_str: str) -> str: def parse_args(args): - parser = argparse.ArgumentParser( prog="Harvest Runner", description="etl harvest sources" ) @@ -136,7 +135,6 @@ def get_all_running_tasks(self, tasks): return sum(1 for _ in filter(lambda task: task["state"] == "RUNNING", tasks)) def read_recent_app_logs(self, app_guuid, task_id=None): - app = self.client.v2.apps[app_guuid] logs = filter(lambda lg: task_id in lg, [str(log) for log in app.recent_logs()]) return "\n".join(logs) diff --git a/tests/data/cf_tasks_output.json b/tests/data/cf_tasks_output.json new file mode 100644 index 00000000..58e0d822 --- /dev/null +++ b/tests/data/cf_tasks_output.json @@ -0,0 +1,1178 @@ +[ + { + "guid": "a95a7d52-9258-41b3-b0f7-2a23f73f326e", + "created_at": "2024-04-02T15:19:37Z", + "updated_at": "2024-04-02T15:19:43Z", + "sequence_id": 2, + "name": "cf-client_integration", + "command": "/home/vcap/app/scripts/smoke-test.py", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/a95a7d52-9258-41b3-b0f7-2a23f73f326e" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/a95a7d52-9258-41b3-b0f7-2a23f73f326e/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "40c4dbe0-3915-478c-b6e7-35dcee6ca269", + "created_at": "2024-04-02T15:40:02Z", + "updated_at": "2024-04-02T15:40:07Z", + "sequence_id": 3, + "name": "cf_task_integration", + "command": "/home/vcap/app/scripts/smoke-test.py", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/40c4dbe0-3915-478c-b6e7-35dcee6ca269" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/40c4dbe0-3915-478c-b6e7-35dcee6ca269/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "4021c8b9-eeeb-4f21-b8d1-670800ac383d", + "created_at": "2024-04-02T15:53:37Z", + "updated_at": "2024-04-02T15:53:57Z", + "sequence_id": 4, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 15", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/4021c8b9-eeeb-4f21-b8d1-670800ac383d" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/4021c8b9-eeeb-4f21-b8d1-670800ac383d/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "72c9cf35-e2d9-4f68-a005-51d86661fb7e", + "created_at": "2024-04-02T15:55:02Z", + "updated_at": "2024-04-02T15:55:31Z", + "sequence_id": 5, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "task was cancelled" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/72c9cf35-e2d9-4f68-a005-51d86661fb7e" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/72c9cf35-e2d9-4f68-a005-51d86661fb7e/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "c2aa7430-149b-419c-99f0-13f00a0aea1e", + "created_at": "2024-04-03T15:12:40Z", + "updated_at": "2024-04-03T15:13:47Z", + "sequence_id": 6, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/c2aa7430-149b-419c-99f0-13f00a0aea1e" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/c2aa7430-149b-419c-99f0-13f00a0aea1e/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "6d754d00-c32b-4c1a-8471-f4f78f17500f", + "created_at": "2024-04-03T15:14:22Z", + "updated_at": "2024-04-03T15:15:27Z", + "sequence_id": 7, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/6d754d00-c32b-4c1a-8471-f4f78f17500f" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/6d754d00-c32b-4c1a-8471-f4f78f17500f/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "ce5bdc87-c15c-4f13-9837-3d3b30d9ff05", + "created_at": "2024-04-03T16:12:22Z", + "updated_at": "2024-04-03T16:13:27Z", + "sequence_id": 8, + "name": "test-task-sleep", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/ce5bdc87-c15c-4f13-9837-3d3b30d9ff05" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/ce5bdc87-c15c-4f13-9837-3d3b30d9ff05/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "1c942c2c-8b61-4599-afa9-78defb19199c", + "created_at": "2024-04-19T21:18:59Z", + "updated_at": "2024-04-19T21:20:04Z", + "sequence_id": 9, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/1c942c2c-8b61-4599-afa9-78defb19199c" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/1c942c2c-8b61-4599-afa9-78defb19199c/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "62958323-e933-498e-a55b-c05d42cd3745", + "created_at": "2024-04-19T21:19:32Z", + "updated_at": "2024-04-19T21:20:38Z", + "sequence_id": 10, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/62958323-e933-498e-a55b-c05d42cd3745" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/62958323-e933-498e-a55b-c05d42cd3745/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "4337586e-f48a-4c64-9749-3fcae3a19a9f", + "created_at": "2024-04-19T21:27:19Z", + "updated_at": "2024-04-19T21:28:24Z", + "sequence_id": 11, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/4337586e-f48a-4c64-9749-3fcae3a19a9f" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/4337586e-f48a-4c64-9749-3fcae3a19a9f/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "81e5a3f7-f6ed-4c6a-b755-b3de172266ec", + "created_at": "2024-04-19T21:27:44Z", + "updated_at": "2024-04-19T21:28:49Z", + "sequence_id": 12, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/81e5a3f7-f6ed-4c6a-b755-b3de172266ec" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/81e5a3f7-f6ed-4c6a-b755-b3de172266ec/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "b8c81ab0-ecee-4c54-83ec-436cef0e57c6", + "created_at": "2024-04-19T21:29:35Z", + "updated_at": "2024-04-19T21:30:40Z", + "sequence_id": 13, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/b8c81ab0-ecee-4c54-83ec-436cef0e57c6" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/b8c81ab0-ecee-4c54-83ec-436cef0e57c6/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "08c424c8-91d2-4aa9-add8-326b991f190b", + "created_at": "2024-04-22T16:33:42Z", + "updated_at": "2024-04-22T16:34:48Z", + "sequence_id": 14, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/08c424c8-91d2-4aa9-add8-326b991f190b" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/08c424c8-91d2-4aa9-add8-326b991f190b/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "2d98c904-96e0-4606-8c9a-8468140fb6cc", + "created_at": "2024-04-22T16:49:23Z", + "updated_at": "2024-04-22T16:50:28Z", + "sequence_id": 15, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/2d98c904-96e0-4606-8c9a-8468140fb6cc" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/2d98c904-96e0-4606-8c9a-8468140fb6cc/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "d9e47127-0efc-4f30-95da-616920f1ff68", + "created_at": "2024-04-22T17:26:43Z", + "updated_at": "2024-04-22T17:27:49Z", + "sequence_id": 16, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/d9e47127-0efc-4f30-95da-616920f1ff68" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/d9e47127-0efc-4f30-95da-616920f1ff68/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "18ebbf6d-7248-4c4c-b863-d3f9565aac54", + "created_at": "2024-04-22T18:02:11Z", + "updated_at": "2024-04-22T18:03:16Z", + "sequence_id": 17, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/18ebbf6d-7248-4c4c-b863-d3f9565aac54" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/18ebbf6d-7248-4c4c-b863-d3f9565aac54/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "7e78623a-ff62-4087-b1d4-09608dac09f8", + "created_at": "2024-04-22T18:13:35Z", + "updated_at": "2024-04-22T18:14:40Z", + "sequence_id": 18, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/7e78623a-ff62-4087-b1d4-09608dac09f8" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/7e78623a-ff62-4087-b1d4-09608dac09f8/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "7b58f839-6cd3-4e37-8988-50c5430e9ff1", + "created_at": "2024-04-22T19:47:12Z", + "updated_at": "2024-04-22T19:48:18Z", + "sequence_id": 19, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/7b58f839-6cd3-4e37-8988-50c5430e9ff1" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/7b58f839-6cd3-4e37-8988-50c5430e9ff1/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "e2e9cf95-e89a-4689-89b3-2687a9359a3b", + "created_at": "2024-04-22T19:53:36Z", + "updated_at": "2024-04-22T19:54:42Z", + "sequence_id": 20, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/e2e9cf95-e89a-4689-89b3-2687a9359a3b" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/e2e9cf95-e89a-4689-89b3-2687a9359a3b/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "ab27eeb0-52e7-49c6-9657-5e92a072a969", + "created_at": "2024-04-22T21:13:08Z", + "updated_at": "2024-04-22T21:14:13Z", + "sequence_id": 21, + "name": "cf_task_integration_1", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/ab27eeb0-52e7-49c6-9657-5e92a072a969" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/ab27eeb0-52e7-49c6-9657-5e92a072a969/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "19a0b209-255f-4879-b9e3-201f23eec5d2", + "created_at": "2024-04-22T21:25:22Z", + "updated_at": "2024-04-22T21:25:27Z", + "sequence_id": 22, + "name": "usr/bin/sleep 120", + "command": "test_task", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "APP/TASK/usr/bin/sleep 120: Exited with status 127" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/19a0b209-255f-4879-b9e3-201f23eec5d2" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/19a0b209-255f-4879-b9e3-201f23eec5d2/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "efed5a98-2dcc-450d-aefb-6b4e873efb82", + "created_at": "2024-04-22T21:26:43Z", + "updated_at": "2024-04-22T21:26:48Z", + "sequence_id": 23, + "name": "task_test_1", + "command": "usr/bin/sleep 120", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "APP/TASK/task_test_1: Exited with status 127" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/efed5a98-2dcc-450d-aefb-6b4e873efb82" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/efed5a98-2dcc-450d-aefb-6b4e873efb82/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "160d4398-a63c-42ac-a11f-c58818384cd9", + "created_at": "2024-04-22T21:36:27Z", + "updated_at": "2024-04-22T21:36:33Z", + "sequence_id": 24, + "name": "abdcefg", + "command": "usr/bin/sleep 120", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "APP/TASK/abdcefg: Exited with status 127" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/160d4398-a63c-42ac-a11f-c58818384cd9" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/160d4398-a63c-42ac-a11f-c58818384cd9/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "1b6fed52-93a7-4e05-a703-fcc4e62b9d2e", + "created_at": "2024-04-22T21:45:43Z", + "updated_at": "2024-04-22T21:45:46Z", + "sequence_id": 25, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "task was cancelled" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/1b6fed52-93a7-4e05-a703-fcc4e62b9d2e" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/1b6fed52-93a7-4e05-a703-fcc4e62b9d2e/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "14bc647f-fdd3-4bf6-8371-a435524b7fd6", + "created_at": "2024-04-23T13:21:32Z", + "updated_at": "2024-04-23T13:21:35Z", + "sequence_id": 26, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "task was cancelled" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/14bc647f-fdd3-4bf6-8371-a435524b7fd6" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/14bc647f-fdd3-4bf6-8371-a435524b7fd6/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "1ccfc7e6-7124-460b-8c15-be1647e0c84e", + "created_at": "2024-04-25T21:42:42Z", + "updated_at": "2024-04-25T21:43:48Z", + "sequence_id": 27, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": None + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/1ccfc7e6-7124-460b-8c15-be1647e0c84e" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/1ccfc7e6-7124-460b-8c15-be1647e0c84e/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "a9c1c4ef-b976-4a3c-ae16-320de3ca7a19", + "created_at": "2024-04-30T16:32:15Z", + "updated_at": "2024-04-30T16:32:19Z", + "sequence_id": 28, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "task was cancelled" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/a9c1c4ef-b976-4a3c-ae16-320de3ca7a19" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/a9c1c4ef-b976-4a3c-ae16-320de3ca7a19/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + }, + { + "guid": "8f64f38e-952b-435f-9592-d2cc5843958a", + "created_at": "2024-05-02T18:10:35Z", + "updated_at": "2024-05-02T18:10:40Z", + "sequence_id": 29, + "name": "cf_task_integration", + "command": "/usr/bin/sleep 60", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": -1, + "result": { + "failure_reason": "task was cancelled" + }, + "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", + "relationships": { + "app": { + "data": { + "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.fr.cloud.gov/v3/tasks/8f64f38e-952b-435f-9592-d2cc5843958a" + }, + "app": { + "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" + }, + "cancel": { + "href": "https://api.fr.cloud.gov/v3/tasks/8f64f38e-952b-435f-9592-d2cc5843958a/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" + } + } + } +] \ No newline at end of file From 6a803e2fb768d1c1ed56b0e980fa5b3316319137 Mon Sep 17 00:00:00 2001 From: Tyler Burton Date: Tue, 7 May 2024 11:54:59 -0500 Subject: [PATCH 2/5] adds tests for load manager module --- app/scripts/load_manager.py | 43 ++++----- database/interface.py | 5 +- harvester/utils.py | 1 + tests/unit/test_load_manager.py | 150 ++++++++++++++++++++++++++++++++ 4 files changed, 178 insertions(+), 21 deletions(-) create mode 100644 tests/unit/test_load_manager.py diff --git a/app/scripts/load_manager.py b/app/scripts/load_manager.py index 0027af22..55096ada 100644 --- a/app/scripts/load_manager.py +++ b/app/scripts/load_manager.py @@ -1,59 +1,62 @@ import os -from app.interface import HarvesterDBInterface +from database.interface import HarvesterDBInterface from harvester.utils import CFHandler DATABASE_URI = os.getenv("DATABASE_URI") +CF_API_URL = os.getenv("CF_API_URL") +CF_SERVICE_USER = os.getenv("CF_SERVICE_USER") +CF_SERVICE_AUTH = os.getenv("CF_SERVICE_AUTH") +LM_RUNNER_APP_GUID = os.getenv("LM_RUNNER_APP_GUID") +CF_INSTANCE_INDEX = os.getenv("CF_INSTANCE_INDEX") -interface = HarvesterDBInterface() -cf_handler = CFHandler() +LM_MAX_TASKS_COUNT = 3 -MAX_JOBS_COUNT = 3 -APP_GUID = "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" # TODO: TEMP +interface = HarvesterDBInterface() +cf_handler = CFHandler(CF_API_URL, CF_SERVICE_USER, CF_SERVICE_AUTH) def create_task(jobId): return { - "app_guuid": APP_GUID, + "app_guuid": LM_RUNNER_APP_GUID, "command": f"python harvest.py {jobId}", "task_id": f"harvest-job-{jobId}", } +def sort_jobs(jobs): + return sorted(jobs, key=lambda x: x["status"], reverse=True) + + def load_manager(): # confirm CF_INSTANCE_INDEX == 0 or bail + if os.getenv("CF_INSTANCE_INDEX") != "0": + return # filter harvestjobs by pending / pending_manual jobs = interface.get_harvest_jobs_by_filter_multival( "status", ["pending", "pending_manual"] ) - print("db jobs") - print(jobs) # get current list of all tasks - current_tasks = cf_handler.get_all_app_tasks(APP_GUID) - + current_tasks = cf_handler.get_all_app_tasks(LM_RUNNER_APP_GUID) # filter out in_process tasks running_tasks = cf_handler.get_all_running_tasks(current_tasks) # confirm tasks < MAX_JOBS_COUNT or bail - if MAX_JOBS_COUNT < running_tasks: + if LM_MAX_TASKS_COUNT < running_tasks: return else: - slots = MAX_JOBS_COUNT - running_tasks + slots = LM_MAX_TASKS_COUNT - running_tasks # sort jobs by pending_manual first - jobs.sort(key=lambda x: x["status"], reverse=True) + sorted_jobs = sort_jobs(jobs) # slice off jobs to invoke - jobs_to_invoke = jobs[:slots] + jobs_to_invoke = sorted_jobs[:slots] # invoke cf_task with next job(s) - # THEN mark that job(s) as running in the DB + # then mark that job(s) as running in the DB for job in jobs_to_invoke: task_contract = create_task(job["id"]) - print("task_contract") - print(task_contract) - task_status = cf_handler.start_task(**task_contract) - print("task_status") - print(task_status) + cf_handler.start_task(**task_contract) interface.update_harvest_job(job["id"], {"status": "in_progress"}) diff --git a/database/interface.py b/database/interface.py index b4f65217..7a1677be 100644 --- a/database/interface.py +++ b/database/interface.py @@ -256,7 +256,10 @@ def get_harvest_record_by_source(self, source_id): def get_source_by_jobid(self, jobid): harvest_job = self.db.query(HarvestJob).filter_by(id=jobid).first() - return HarvesterDBInterface._to_dict(harvest_job.source) + if harvest_job is None: + return None + else: + return HarvesterDBInterface._to_dict(harvest_job.source) def close(self): if hasattr(self.db, "remove"): diff --git a/harvester/utils.py b/harvester/utils.py index d85589ac..48d7a924 100644 --- a/harvester/utils.py +++ b/harvester/utils.py @@ -113,6 +113,7 @@ def __init__(self, url: str, user: str, password: str): self.url = url self.user = user self.password = password + self.setup() def setup(self): self.client = CloudFoundryClient(self.url) diff --git a/tests/unit/test_load_manager.py b/tests/unit/test_load_manager.py new file mode 100644 index 00000000..d34b00d6 --- /dev/null +++ b/tests/unit/test_load_manager.py @@ -0,0 +1,150 @@ +import pytest + +from unittest.mock import patch +from app.scripts.load_manager import load_manager, sort_jobs +from app.scripts.load_manager import CFHandler +from app.scripts.load_manager import HarvesterDBInterface + + +@pytest.fixture +def mock_good_cf_index(monkeypatch): + monkeypatch.setenv("CF_INSTANCE_INDEX", "0") + + +@pytest.fixture +def mock_bad_cf_index(monkeypatch): + monkeypatch.setenv("CF_INSTANCE_INDEX", "1") + + +@pytest.fixture(autouse=True) +def mock_lm_config(monkeypatch): + monkeypatch.setenv("LM_RUNNER_APP_GUID", "f4ab7f86-bee0-44fd-8806-1dca7f8e215a") + + +class TestLoadManager: + @patch.object(HarvesterDBInterface, "update_harvest_job") + @patch.object(CFHandler, "start_task") + @patch.object(CFHandler, "get_all_running_tasks") + @patch.object(CFHandler, "get_all_app_tasks") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + def test_load_manager_invokes_tasks( + self, + db_get_harvest_jobs_by_filter_multival_mock, + cf_get_all_app_tasks_mock, + cf_get_all_running_tasks_mock, + cf_start_task_mock, + db_update_harvest_job_mock, + job_data_dcatus, + job_data_waf, + dhl_cf_task_data, + mock_good_cf_index, + ): + db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + job_data_dcatus, + job_data_waf, + ] + cf_get_all_app_tasks_mock.return_value = [] + cf_get_all_running_tasks_mock.return_value = 2 + cf_start_task_mock.return_value = "ok" + db_update_harvest_job_mock.return_value = "ok" + load_manager() + + # assert all mocks are called when env vars in place + assert db_get_harvest_jobs_by_filter_multival_mock.called + assert cf_get_all_app_tasks_mock.called + assert cf_get_all_running_tasks_mock.called + assert cf_start_task_mock.called + assert db_update_harvest_job_mock.called + + # assert derived slot val is same as calls to cf_start_task_mock + assert ( + 3 - cf_get_all_running_tasks_mock.return_value + ) == cf_start_task_mock.call_count + + @patch.object(HarvesterDBInterface, "update_harvest_job") + @patch.object(CFHandler, "start_task") + @patch.object(CFHandler, "get_all_running_tasks") + @patch.object(CFHandler, "get_all_app_tasks") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + def test_load_manager_hits_task_limit( + self, + db_get_harvest_jobs_by_filter_multival_mock, + cf_get_all_app_tasks_mock, + cf_get_all_running_tasks_mock, + cf_start_task_mock, + db_update_harvest_job_mock, + job_data_dcatus, + job_data_waf, + dhl_cf_task_data, + mock_good_cf_index, + ): + db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + job_data_dcatus, + job_data_waf, + ] + cf_get_all_app_tasks_mock.return_value = [] + cf_get_all_running_tasks_mock.return_value = 3 + cf_start_task_mock.return_value = "ok" + db_update_harvest_job_mock.return_value = "ok" + load_manager() + + # assert certain mocks are called + assert db_get_harvest_jobs_by_filter_multival_mock.called + assert cf_get_all_app_tasks_mock.called + assert cf_get_all_running_tasks_mock.called + # assert certain mocks are not called when + # cf_get_all_running_tasks_mock is at limit + assert not cf_start_task_mock.called + assert not db_update_harvest_job_mock.called + + assert ( + 3 - cf_get_all_running_tasks_mock.return_value + ) == cf_start_task_mock.call_count + + @patch.object(HarvesterDBInterface, "update_harvest_job") + @patch.object(CFHandler, "start_task") + @patch.object(CFHandler, "get_all_running_tasks") + @patch.object(CFHandler, "get_all_app_tasks") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + def test_load_manager_bails_on_incorrect_index( + self, + db_get_harvest_jobs_by_filter_multival_mock, + cf_get_all_app_tasks_mock, + cf_get_all_running_tasks_mock, + cf_start_task_mock, + db_update_harvest_job_mock, + job_data_dcatus, + job_data_waf, + dhl_cf_task_data, + mock_bad_cf_index, + ): + db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + job_data_dcatus, + job_data_dcatus, + ] + cf_get_all_app_tasks_mock.return_value = [] + cf_get_all_running_tasks_mock.return_value = 2 + cf_start_task_mock.return_value = "ok" + db_update_harvest_job_mock.return_value = "ok" + load_manager() + + # assert all mocks are NOT called when env vars NOT in place + assert not db_get_harvest_jobs_by_filter_multival_mock.called + assert not cf_get_all_app_tasks_mock.called + assert not cf_get_all_app_tasks_mock.called + assert not cf_get_all_running_tasks_mock.called + + def test_sort_jobs(self): + jobs = [ + {"status": "pending"}, + {"status": "pending"}, + {"status": "pending_manual"}, + ] + + sorted_jobs = sort_jobs(jobs) + + assert sorted_jobs == [ + {"status": "pending_manual"}, + {"status": "pending"}, + {"status": "pending"}, + ] From 1e330b31c0d2988c0a29d59d20bd076451208631 Mon Sep 17 00:00:00 2001 From: Tyler Burton Date: Tue, 7 May 2024 12:59:01 -0500 Subject: [PATCH 3/5] adds db filter tests --- app/scripts/load_manager.py | 2 +- database/interface.py | 2 +- tests/conftest.py | 19 ++++++++++++++++++- tests/unit/database/test_db.py | 32 ++++++++++++++++++++++++++++++-- tests/unit/test_load_manager.py | 24 ++++++++++++------------ 5 files changed, 62 insertions(+), 17 deletions(-) diff --git a/app/scripts/load_manager.py b/app/scripts/load_manager.py index 55096ada..63c78351 100644 --- a/app/scripts/load_manager.py +++ b/app/scripts/load_manager.py @@ -33,7 +33,7 @@ def load_manager(): return # filter harvestjobs by pending / pending_manual - jobs = interface.get_harvest_jobs_by_filter_multival( + jobs = interface.get_harvest_jobs_by_faceted_filter( "status", ["pending", "pending_manual"] ) diff --git a/database/interface.py b/database/interface.py index 7a1677be..78894bb3 100644 --- a/database/interface.py +++ b/database/interface.py @@ -154,7 +154,7 @@ def get_harvest_jobs_by_filter(self, filter): harvest_jobs_data = [HarvesterDBInterface._to_dict(job) for job in harvest_jobs] return harvest_jobs_data - def get_harvest_jobs_by_filter_multival(self, attr, values): + def get_harvest_jobs_by_faceted_filter(self, attr, values): query_list = [getattr(HarvestJob, attr) == value for value in values] harvest_jobs = self.db.query(HarvestJob).filter(or_(*query_list)).all() harvest_jobs_data = [HarvesterDBInterface._to_dict(job) for job in harvest_jobs] diff --git a/tests/conftest.py b/tests/conftest.py index 30097471..109d13a0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -188,6 +188,24 @@ def source_data_dcatus_invalid_records_job( } +@pytest.fixture +def interface_with_multiple_jobs( + interface, + source_data_dcatus: dict, +): + statuses = ["pending", "pending_manual", "in_progress", "complete"] + source_ids = ["1234", "abcd"] + jobs = [ + {"status": status, "harvest_source_id": source} + for status in statuses + for source in source_ids + ] + for job in jobs: + interface.add_harvest_job(job) + + return interface + + @pytest.fixture def internal_compare_data(job_data_dcatus: dict) -> dict: # ruff: noqa: E501 @@ -249,7 +267,6 @@ def internal_compare_data(job_data_dcatus: dict) -> dict: @pytest.fixture def cf_handler() -> CFHandler: - url = os.getenv("CF_API_URL") user = os.getenv("CF_SERVICE_USER") password = os.getenv("CF_SERVICE_AUTH") diff --git a/tests/unit/database/test_db.py b/tests/unit/database/test_db.py index 8b2e0182..da23fb3e 100644 --- a/tests/unit/database/test_db.py +++ b/tests/unit/database/test_db.py @@ -95,7 +95,6 @@ def test_add_harvest_record( job_data_dcatus, record_data_dcatus, ): - interface.add_organization(organization_data) source = interface.add_harvest_source(source_data_dcatus) harvest_job = interface.add_harvest_job(job_data_dcatus) @@ -113,7 +112,6 @@ def test_add_harvest_records( job_data_dcatus, record_data_dcatus, ): - interface.add_organization(organization_data) interface.add_harvest_source(source_data_dcatus) interface.add_harvest_job(job_data_dcatus) @@ -122,3 +120,33 @@ def test_add_harvest_records( success = interface.add_harvest_records(records) assert success is True assert len(interface.get_all_harvest_records()) == 10 + + def test_add_harvest_job_with_id(self, interface, job_data_dcatus): + job = interface.add_harvest_job(job_data_dcatus) + assert job.id == job_data_dcatus["id"] + assert job.status == job_data_dcatus["status"] + assert job.harvest_source_id == job_data_dcatus["harvest_source_id"] + + def test_add_harvest_job_without_id(self, interface, job_data_dcatus): + job_data_dcatus_id = job_data_dcatus["id"] + del job_data_dcatus["id"] + job = interface.add_harvest_job(job_data_dcatus) + assert job.id + assert job.id != job_data_dcatus_id + assert job.status == job_data_dcatus["status"] + assert job.harvest_source_id == job_data_dcatus["harvest_source_id"] + + def test_get_harvest_jobs_by_filter(self, interface_with_multiple_jobs): + filters = {"status": "pending", "harvest_source_id": "1234"} + filtered_list = interface_with_multiple_jobs.get_harvest_jobs_by_filter(filters) + assert len(filtered_list) == 1 + assert filtered_list[0]["status"] == "pending" + assert filtered_list[0]["harvest_source_id"] == "1234" + + def test_filter_jobs_by_faceted_filter(self, interface_with_multiple_jobs): + faceted_list = interface_with_multiple_jobs.get_harvest_jobs_by_faceted_filter( + "status", ["pending", "pending_manual"] + ) + assert len(faceted_list) == 4 + assert len([x for x in faceted_list if x["status"] == "pending"]) == 2 + assert len([x for x in faceted_list if x["harvest_source_id"] == "1234"]) == 2 diff --git a/tests/unit/test_load_manager.py b/tests/unit/test_load_manager.py index d34b00d6..ac80ed58 100644 --- a/tests/unit/test_load_manager.py +++ b/tests/unit/test_load_manager.py @@ -26,10 +26,10 @@ class TestLoadManager: @patch.object(CFHandler, "start_task") @patch.object(CFHandler, "get_all_running_tasks") @patch.object(CFHandler, "get_all_app_tasks") - @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_faceted_filter") def test_load_manager_invokes_tasks( self, - db_get_harvest_jobs_by_filter_multival_mock, + db_get_harvest_jobs_by_faceted_filter_mock, cf_get_all_app_tasks_mock, cf_get_all_running_tasks_mock, cf_start_task_mock, @@ -39,7 +39,7 @@ def test_load_manager_invokes_tasks( dhl_cf_task_data, mock_good_cf_index, ): - db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + db_get_harvest_jobs_by_faceted_filter_mock.return_value = [ job_data_dcatus, job_data_waf, ] @@ -50,7 +50,7 @@ def test_load_manager_invokes_tasks( load_manager() # assert all mocks are called when env vars in place - assert db_get_harvest_jobs_by_filter_multival_mock.called + assert db_get_harvest_jobs_by_faceted_filter_mock.called assert cf_get_all_app_tasks_mock.called assert cf_get_all_running_tasks_mock.called assert cf_start_task_mock.called @@ -65,10 +65,10 @@ def test_load_manager_invokes_tasks( @patch.object(CFHandler, "start_task") @patch.object(CFHandler, "get_all_running_tasks") @patch.object(CFHandler, "get_all_app_tasks") - @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_faceted_filter") def test_load_manager_hits_task_limit( self, - db_get_harvest_jobs_by_filter_multival_mock, + db_get_harvest_jobs_by_faceted_filter_mock, cf_get_all_app_tasks_mock, cf_get_all_running_tasks_mock, cf_start_task_mock, @@ -78,7 +78,7 @@ def test_load_manager_hits_task_limit( dhl_cf_task_data, mock_good_cf_index, ): - db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + db_get_harvest_jobs_by_faceted_filter_mock.return_value = [ job_data_dcatus, job_data_waf, ] @@ -89,7 +89,7 @@ def test_load_manager_hits_task_limit( load_manager() # assert certain mocks are called - assert db_get_harvest_jobs_by_filter_multival_mock.called + assert db_get_harvest_jobs_by_faceted_filter_mock.called assert cf_get_all_app_tasks_mock.called assert cf_get_all_running_tasks_mock.called # assert certain mocks are not called when @@ -105,10 +105,10 @@ def test_load_manager_hits_task_limit( @patch.object(CFHandler, "start_task") @patch.object(CFHandler, "get_all_running_tasks") @patch.object(CFHandler, "get_all_app_tasks") - @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_filter_multival") + @patch.object(HarvesterDBInterface, "get_harvest_jobs_by_faceted_filter") def test_load_manager_bails_on_incorrect_index( self, - db_get_harvest_jobs_by_filter_multival_mock, + db_get_harvest_jobs_by_faceted_filter_mock, cf_get_all_app_tasks_mock, cf_get_all_running_tasks_mock, cf_start_task_mock, @@ -118,7 +118,7 @@ def test_load_manager_bails_on_incorrect_index( dhl_cf_task_data, mock_bad_cf_index, ): - db_get_harvest_jobs_by_filter_multival_mock.return_value = [ + db_get_harvest_jobs_by_faceted_filter_mock.return_value = [ job_data_dcatus, job_data_dcatus, ] @@ -129,7 +129,7 @@ def test_load_manager_bails_on_incorrect_index( load_manager() # assert all mocks are NOT called when env vars NOT in place - assert not db_get_harvest_jobs_by_filter_multival_mock.called + assert not db_get_harvest_jobs_by_faceted_filter_mock.called assert not cf_get_all_app_tasks_mock.called assert not cf_get_all_app_tasks_mock.called assert not cf_get_all_running_tasks_mock.called From 48ec1f9296e32fb68774aae79727ad525bf68ced Mon Sep 17 00:00:00 2001 From: Tyler Burton Date: Tue, 7 May 2024 13:00:57 -0500 Subject: [PATCH 4/5] deletes unnecessary stub file --- tests/data/cf_tasks_output.json | 1178 ------------------------------- 1 file changed, 1178 deletions(-) delete mode 100644 tests/data/cf_tasks_output.json diff --git a/tests/data/cf_tasks_output.json b/tests/data/cf_tasks_output.json deleted file mode 100644 index 58e0d822..00000000 --- a/tests/data/cf_tasks_output.json +++ /dev/null @@ -1,1178 +0,0 @@ -[ - { - "guid": "a95a7d52-9258-41b3-b0f7-2a23f73f326e", - "created_at": "2024-04-02T15:19:37Z", - "updated_at": "2024-04-02T15:19:43Z", - "sequence_id": 2, - "name": "cf-client_integration", - "command": "/home/vcap/app/scripts/smoke-test.py", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/a95a7d52-9258-41b3-b0f7-2a23f73f326e" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/a95a7d52-9258-41b3-b0f7-2a23f73f326e/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "40c4dbe0-3915-478c-b6e7-35dcee6ca269", - "created_at": "2024-04-02T15:40:02Z", - "updated_at": "2024-04-02T15:40:07Z", - "sequence_id": 3, - "name": "cf_task_integration", - "command": "/home/vcap/app/scripts/smoke-test.py", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/40c4dbe0-3915-478c-b6e7-35dcee6ca269" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/40c4dbe0-3915-478c-b6e7-35dcee6ca269/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "4021c8b9-eeeb-4f21-b8d1-670800ac383d", - "created_at": "2024-04-02T15:53:37Z", - "updated_at": "2024-04-02T15:53:57Z", - "sequence_id": 4, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 15", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/4021c8b9-eeeb-4f21-b8d1-670800ac383d" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/4021c8b9-eeeb-4f21-b8d1-670800ac383d/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "72c9cf35-e2d9-4f68-a005-51d86661fb7e", - "created_at": "2024-04-02T15:55:02Z", - "updated_at": "2024-04-02T15:55:31Z", - "sequence_id": 5, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "task was cancelled" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/72c9cf35-e2d9-4f68-a005-51d86661fb7e" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/72c9cf35-e2d9-4f68-a005-51d86661fb7e/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "c2aa7430-149b-419c-99f0-13f00a0aea1e", - "created_at": "2024-04-03T15:12:40Z", - "updated_at": "2024-04-03T15:13:47Z", - "sequence_id": 6, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/c2aa7430-149b-419c-99f0-13f00a0aea1e" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/c2aa7430-149b-419c-99f0-13f00a0aea1e/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "6d754d00-c32b-4c1a-8471-f4f78f17500f", - "created_at": "2024-04-03T15:14:22Z", - "updated_at": "2024-04-03T15:15:27Z", - "sequence_id": 7, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/6d754d00-c32b-4c1a-8471-f4f78f17500f" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/6d754d00-c32b-4c1a-8471-f4f78f17500f/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "ce5bdc87-c15c-4f13-9837-3d3b30d9ff05", - "created_at": "2024-04-03T16:12:22Z", - "updated_at": "2024-04-03T16:13:27Z", - "sequence_id": 8, - "name": "test-task-sleep", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/ce5bdc87-c15c-4f13-9837-3d3b30d9ff05" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/ce5bdc87-c15c-4f13-9837-3d3b30d9ff05/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "1c942c2c-8b61-4599-afa9-78defb19199c", - "created_at": "2024-04-19T21:18:59Z", - "updated_at": "2024-04-19T21:20:04Z", - "sequence_id": 9, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/1c942c2c-8b61-4599-afa9-78defb19199c" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/1c942c2c-8b61-4599-afa9-78defb19199c/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "62958323-e933-498e-a55b-c05d42cd3745", - "created_at": "2024-04-19T21:19:32Z", - "updated_at": "2024-04-19T21:20:38Z", - "sequence_id": 10, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/62958323-e933-498e-a55b-c05d42cd3745" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/62958323-e933-498e-a55b-c05d42cd3745/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "4337586e-f48a-4c64-9749-3fcae3a19a9f", - "created_at": "2024-04-19T21:27:19Z", - "updated_at": "2024-04-19T21:28:24Z", - "sequence_id": 11, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/4337586e-f48a-4c64-9749-3fcae3a19a9f" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/4337586e-f48a-4c64-9749-3fcae3a19a9f/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "81e5a3f7-f6ed-4c6a-b755-b3de172266ec", - "created_at": "2024-04-19T21:27:44Z", - "updated_at": "2024-04-19T21:28:49Z", - "sequence_id": 12, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/81e5a3f7-f6ed-4c6a-b755-b3de172266ec" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/81e5a3f7-f6ed-4c6a-b755-b3de172266ec/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "b8c81ab0-ecee-4c54-83ec-436cef0e57c6", - "created_at": "2024-04-19T21:29:35Z", - "updated_at": "2024-04-19T21:30:40Z", - "sequence_id": 13, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/b8c81ab0-ecee-4c54-83ec-436cef0e57c6" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/b8c81ab0-ecee-4c54-83ec-436cef0e57c6/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "08c424c8-91d2-4aa9-add8-326b991f190b", - "created_at": "2024-04-22T16:33:42Z", - "updated_at": "2024-04-22T16:34:48Z", - "sequence_id": 14, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/08c424c8-91d2-4aa9-add8-326b991f190b" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/08c424c8-91d2-4aa9-add8-326b991f190b/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "2d98c904-96e0-4606-8c9a-8468140fb6cc", - "created_at": "2024-04-22T16:49:23Z", - "updated_at": "2024-04-22T16:50:28Z", - "sequence_id": 15, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/2d98c904-96e0-4606-8c9a-8468140fb6cc" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/2d98c904-96e0-4606-8c9a-8468140fb6cc/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "d9e47127-0efc-4f30-95da-616920f1ff68", - "created_at": "2024-04-22T17:26:43Z", - "updated_at": "2024-04-22T17:27:49Z", - "sequence_id": 16, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/d9e47127-0efc-4f30-95da-616920f1ff68" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/d9e47127-0efc-4f30-95da-616920f1ff68/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "18ebbf6d-7248-4c4c-b863-d3f9565aac54", - "created_at": "2024-04-22T18:02:11Z", - "updated_at": "2024-04-22T18:03:16Z", - "sequence_id": 17, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/18ebbf6d-7248-4c4c-b863-d3f9565aac54" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/18ebbf6d-7248-4c4c-b863-d3f9565aac54/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "7e78623a-ff62-4087-b1d4-09608dac09f8", - "created_at": "2024-04-22T18:13:35Z", - "updated_at": "2024-04-22T18:14:40Z", - "sequence_id": 18, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/7e78623a-ff62-4087-b1d4-09608dac09f8" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/7e78623a-ff62-4087-b1d4-09608dac09f8/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "7b58f839-6cd3-4e37-8988-50c5430e9ff1", - "created_at": "2024-04-22T19:47:12Z", - "updated_at": "2024-04-22T19:48:18Z", - "sequence_id": 19, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/7b58f839-6cd3-4e37-8988-50c5430e9ff1" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/7b58f839-6cd3-4e37-8988-50c5430e9ff1/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "e2e9cf95-e89a-4689-89b3-2687a9359a3b", - "created_at": "2024-04-22T19:53:36Z", - "updated_at": "2024-04-22T19:54:42Z", - "sequence_id": 20, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/e2e9cf95-e89a-4689-89b3-2687a9359a3b" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/e2e9cf95-e89a-4689-89b3-2687a9359a3b/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "ab27eeb0-52e7-49c6-9657-5e92a072a969", - "created_at": "2024-04-22T21:13:08Z", - "updated_at": "2024-04-22T21:14:13Z", - "sequence_id": 21, - "name": "cf_task_integration_1", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/ab27eeb0-52e7-49c6-9657-5e92a072a969" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/ab27eeb0-52e7-49c6-9657-5e92a072a969/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "19a0b209-255f-4879-b9e3-201f23eec5d2", - "created_at": "2024-04-22T21:25:22Z", - "updated_at": "2024-04-22T21:25:27Z", - "sequence_id": 22, - "name": "usr/bin/sleep 120", - "command": "test_task", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "APP/TASK/usr/bin/sleep 120: Exited with status 127" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/19a0b209-255f-4879-b9e3-201f23eec5d2" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/19a0b209-255f-4879-b9e3-201f23eec5d2/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "efed5a98-2dcc-450d-aefb-6b4e873efb82", - "created_at": "2024-04-22T21:26:43Z", - "updated_at": "2024-04-22T21:26:48Z", - "sequence_id": 23, - "name": "task_test_1", - "command": "usr/bin/sleep 120", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "APP/TASK/task_test_1: Exited with status 127" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/efed5a98-2dcc-450d-aefb-6b4e873efb82" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/efed5a98-2dcc-450d-aefb-6b4e873efb82/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "160d4398-a63c-42ac-a11f-c58818384cd9", - "created_at": "2024-04-22T21:36:27Z", - "updated_at": "2024-04-22T21:36:33Z", - "sequence_id": 24, - "name": "abdcefg", - "command": "usr/bin/sleep 120", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "APP/TASK/abdcefg: Exited with status 127" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/160d4398-a63c-42ac-a11f-c58818384cd9" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/160d4398-a63c-42ac-a11f-c58818384cd9/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "1b6fed52-93a7-4e05-a703-fcc4e62b9d2e", - "created_at": "2024-04-22T21:45:43Z", - "updated_at": "2024-04-22T21:45:46Z", - "sequence_id": 25, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "task was cancelled" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/1b6fed52-93a7-4e05-a703-fcc4e62b9d2e" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/1b6fed52-93a7-4e05-a703-fcc4e62b9d2e/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "14bc647f-fdd3-4bf6-8371-a435524b7fd6", - "created_at": "2024-04-23T13:21:32Z", - "updated_at": "2024-04-23T13:21:35Z", - "sequence_id": 26, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "task was cancelled" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/14bc647f-fdd3-4bf6-8371-a435524b7fd6" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/14bc647f-fdd3-4bf6-8371-a435524b7fd6/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "1ccfc7e6-7124-460b-8c15-be1647e0c84e", - "created_at": "2024-04-25T21:42:42Z", - "updated_at": "2024-04-25T21:43:48Z", - "sequence_id": 27, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "SUCCEEDED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": None - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/1ccfc7e6-7124-460b-8c15-be1647e0c84e" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/1ccfc7e6-7124-460b-8c15-be1647e0c84e/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "a9c1c4ef-b976-4a3c-ae16-320de3ca7a19", - "created_at": "2024-04-30T16:32:15Z", - "updated_at": "2024-04-30T16:32:19Z", - "sequence_id": 28, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "task was cancelled" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/a9c1c4ef-b976-4a3c-ae16-320de3ca7a19" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/a9c1c4ef-b976-4a3c-ae16-320de3ca7a19/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - }, - { - "guid": "8f64f38e-952b-435f-9592-d2cc5843958a", - "created_at": "2024-05-02T18:10:35Z", - "updated_at": "2024-05-02T18:10:40Z", - "sequence_id": 29, - "name": "cf_task_integration", - "command": "/usr/bin/sleep 60", - "state": "FAILED", - "memory_in_mb": 512, - "disk_in_mb": 1024, - "log_rate_limit_in_bytes_per_second": -1, - "result": { - "failure_reason": "task was cancelled" - }, - "droplet_guid": "0bdebb73-7bef-4d3b-87bf-1376df752814", - "relationships": { - "app": { - "data": { - "guid": "f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - } - } - }, - "metadata": { - "labels": {}, - "annotations": {} - }, - "links": { - "self": { - "href": "https://api.fr.cloud.gov/v3/tasks/8f64f38e-952b-435f-9592-d2cc5843958a" - }, - "app": { - "href": "https://api.fr.cloud.gov/v3/apps/f4ab7f86-bee0-44fd-8806-1dca7f8e215a" - }, - "cancel": { - "href": "https://api.fr.cloud.gov/v3/tasks/8f64f38e-952b-435f-9592-d2cc5843958a/actions/cancel", - "method": "POST" - }, - "droplet": { - "href": "https://api.fr.cloud.gov/v3/droplets/0bdebb73-7bef-4d3b-87bf-1376df752814" - } - } - } -] \ No newline at end of file From a311e836e53bedda6fd68e64f12f9bc5ad0e4175 Mon Sep 17 00:00:00 2001 From: Tyler Burton Date: Tue, 7 May 2024 13:04:19 -0500 Subject: [PATCH 5/5] bumps version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 90c4b127..2751dd43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "datagov-harvesting-logic" -version = "0.4.0" +version = "0.4.1" description = "" # authors = [ # {name = "Jin Sun", email = "jin.sun@gsa.gov"},