database_config_path=DATABASE_MULTICARE_CONFIG_PATH,
    ), "initialize")
ns_multicare.add_task(
    scope.tasks.database_populate.task_populate(
        instance_ssh_config_path=INSTANCE_SSH_CONFIG_PATH,
        documentdb_config_path=DOCUMENTDB_CONFIG_PATH,
        database_config_path=DATABASE_MULTICARE_CONFIG_PATH,
        cognito_config_path=COGNITO_CONFIG_PATH,
        populate_dir_path=POPULATE_MULTICARE_DIR_PATH,
    ), "populate")

ns_scca = Collection("scca")
ns_scca.add_task(
    scope.tasks.database_initialize.task_initialize(
        instance_ssh_config_path=INSTANCE_SSH_CONFIG_PATH,
        documentdb_config_path=DOCUMENTDB_CONFIG_PATH,
        database_config_path=DATABASE_SCCA_CONFIG_PATH,
    ), "initialize")
ns_scca.add_task(
    scope.tasks.database_populate.task_populate(
        instance_ssh_config_path=INSTANCE_SSH_CONFIG_PATH,
        documentdb_config_path=DOCUMENTDB_CONFIG_PATH,
        database_config_path=DATABASE_SCCA_CONFIG_PATH,
        cognito_config_path=COGNITO_CONFIG_PATH,
        populate_dir_path=POPULATE_SCCA_DIR_PATH,
    ), "populate")

compose_collection(ns, ns_demo, name="demo")
compose_collection(ns, ns_multicare, name="multicare")
compose_collection(ns, ns_scca, name="scca")
Exemple #2
0
    For development purposes, asynchronously starts in a new terminal.
    """

    if spawn_new_terminal(context):
        with context.cd(Path(CELERY_DIR)):
            context.run(
                command=' '.join([
                    'pipenv',
                    'run',
                    'python',
                    'app.py',
                    # '-A app',
                    'worker',
                    '-l info',
                    '--concurrency=1',
                    '--pool=gevent',
                ]), )


# Build task collection
ns = Collection('celery')

ns_dev = Collection('dev')
ns_dev.add_task(dev_serve, 'serve')

ns_prod = Collection('prod')

compose_collection(ns, ns_dev, name='dev')
compose_collection(ns, ns_prod, name='prod')
Exemple #3
0
import tasks.terraform.instance_worker
# import tasks.terraform_old.ecr
# import tasks.terraform_old.eip
# import tasks.terraform_old.instance

# Enable color
aws_infrastructure.tasks.library.color.enable_color()
# Apply the current AWS configuration
aws_infrastructure.tasks.library.aws_configure.apply_aws_env(
    aws_env_path=tasks.aws.AWS_ENV_PATH)

# Build primary task collection
ns = Collection()

# Compose from aws.py
compose_collection(ns, tasks.aws.ns, name='aws')

# Compose from codebuild
ns_codebuild = Collection("codebuild")
compose_collection(ns_codebuild,
                   tasks.codebuild.migraine_flask.ns,
                   name="flask")
compose_collection(ns, ns_codebuild, name="codebuild")

# Compose from database.py
compose_collection(ns, tasks.database.ns, name="database")

# Compose from dependencies.py
compose_collection(ns, tasks.dependencies.ns, name="depend")

# Compose from helm.py