It's possible to run Sendy on ECS + Fargate. My infrastructure is as follows:
- RDS MySQL
- EFS
- ALB
- ACM certificate
- ECS Service
- ALB target group
| <?php phpinfo(); |
| import boto3 | |
| def _get_secrets(path: str): | |
| client = boto3.client('ssm') | |
| secrets = {} | |
| kwargs = {} | |
| while True: | |
| result = client.get_parameters_by_path( | |
| Path=path, |
| # Why not to just put all your code under if __name__ == '__main__': | |
| # (AKA why you should use a main(argv) function) | |
| import sys | |
| def my_func(param): | |
| print param | |
| # You'd think this would fail, but it works, because new_param is in the | |
| # parent level scope. It will fail if you import this file and call |
| import logging | |
| # Change the default encoding of stdout to utf-8. | |
| # This is effective if the output is piped or redirected. | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| # Add a file handler with utf-8 encoding | |
| handler = logging.FileHandler('output.log', 'w', |
| @issue | |
| Feature: Issue #TBD: Logging starts with a StreamHandler way too early | |
| Scenario: | |
| Given a file named "features/steps/steps.py" with: | |
| """ | |
| import logging | |
| from behave import given, when, then, step |
| #!/bin/bash | |
| # Note - you can't run this script in the local terminal. | |
| # Run it via SSH or cron or something else. | |
| COMMANDS="your automation script here" | |
| killall python 2>/dev/null | |
| killall Terminal 2>/dev/null |
| import atomac | |
| from atomac.AXKeyCodeConstants import * | |
| app=atomac.getAppRefByLocalizedName('iTerm') | |
| # the COMMAND constant here comes from AXKeyCodeConstants | |
| app.sendGlobalKeyWithModifiers('n', [COMMAND]) |
| import atomac | |
| a=atomac.getAppRefByLocalizedName('Skype') | |
| cloud_menu = a.AXChildren[2].AXChildren[0] | |
| print cloud_menu | |
| # Some apps are coded so menu items aren't populated until they're displayed | |
| try: | |
| cloud_menu.Press() | |
| except atomac.ErrorCannotComplete: | |
| # An accessibility bug you'll see sometimes - the app never reports |