From 738937e986c7c737596b6b2ffdbf44ca8f57eed9 Mon Sep 17 00:00:00 2001 From: Javier Bravo Date: Thu, 16 Mar 2017 21:10:59 +0000 Subject: [PATCH 1/4] Upade README - contributing --- README.md | 6 ++-- TODO.md | 91 ------------------------------------------------------- 2 files changed, 3 insertions(+), 94 deletions(-) delete mode 100644 TODO.md diff --git a/README.md b/README.md index cb5e535..cb89c0c 100644 --- a/README.md +++ b/README.md @@ -417,10 +417,10 @@ $ lambda-cron create --help ``` -## TODO & CONTRIBUTING +## CONTRIBUTING -In [TODO](./TODO.md) there is a list of features/improvements that -would be good to have in **LambdaCron**. +Contributions are welcome. You can find open issues with some features and +improvements that would be good to have in **LambdaCron**. Before contribute we encourage to take a look of following [tips provided by GitHub](https://guides.github.com/activities/contributing-to-open-source/) diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 85b560a..0000000 --- a/TODO.md +++ /dev/null @@ -1,91 +0,0 @@ - -# TODO - LambdaCron - -This files describes a list of features and/or improvements that would be -good to have in **LambdaCron** - -### Disable task -Currently the only way to disable tasks is to remove the file that define -the task. Be able to disable tasks in the task definition could be useful. - -Proposals: - -1. Add new attribute in task definition to indicate if the task is enabled or disabled: - * enabaled: \[True|False\] (True by default) - -1. Replace cron expression with a keyword, ie. disabled - -### Tasks Index -When AWS Lambda function run it reads all the task definitions (yml files) in *tasks* and -evaluate the cron expression for each of them. While the number of task grows -performance can be affected negatively. - -Proposal: - -1. When uploading the tasks create a file indexing tasks files by cron expression. -In this way the AWS Lambda function will read the index file, evaluate different cron -expressions only once and will read only the files with the tasks that must be executed. -Example: - -```yaml -*/30 * * * *: - - my_task_definition_1.yml - - my_task_definition_2.yml -0 * * * *: - - my_task_definiiton_3.yml -``` - -### Support parameters for [boto3 SQS.Queue.send_message](http://boto3.readthedocs.io/en/latest/reference/services/sqs.html#SQS.Queue.send_message) -For **Queue** tasks, currently, the tool only allow to indicate the message body -to send to the queue. It doesn't allow the possibility to use all options provided -by the library. - -Proposal: - -1. Update task runner to handle all or most useful options provided by boto3 -to send a message to a SQS queue. - -### Support HTTP methods in [Requests](http://docs.python-requests.org/en/master/) -The current version of **LambdaCron** only allow to send **GET** and **POST** requests. - -Proposal: - -1. Update task runner to handle all (of most of them) HTTP methods available in -[Requests](http://docs.python-requests.org/en/master/) - -### Improve CLI output -The CLI output shows the output/results of the commands executed to do the job. It -is not user friendly. - -Proposal: - -1. Hide output from the commands executed by the tool and show meaningful output -for the user: - * Summary of the task running (environment and options) - * Status of the process - -### Allow nested setting files -Currently **LambdaCron** allows to set environment options in one file -(*~/.lambda-cron.yml*). Could be good to be able to set environment options -in different files (different projects). - -Proposal: - -1. Be able to include setting files in *~/.lambda-cron.yml*. For example: - -```yaml -my-project-a: - settings: /path/to/my-project-a/lambda-cron.yml -my-project-b: - settings: /path/to/my-porject-b/lambda-cron.yml -``` - -### Add additional commands -Continue adding commands to the tool that would allow to do/check anything -with the tool in the command line (as it would be crontab) without having -to access to AWS console. - -Proposals: - -1. Manage/show logs from CloudWatch in the terminal. -1. Check status of the project in the terminal: enabled/disabled, number of tasks, ... From 6ed611385513aeaa60b3be44eeb3e244b2d076b5 Mon Sep 17 00:00:00 2001 From: Javier Bravo Date: Thu, 16 Mar 2017 21:25:18 +0000 Subject: [PATCH 2/4] Update README - development --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb89c0c..837965d 100644 --- a/README.md +++ b/README.md @@ -385,6 +385,8 @@ Be aware of this. ## Getting Started +**Important!** The tool is not available in **pip** yet. If you want to try it, qcheck [Development](#Development) + ### Install ``` bash @@ -416,8 +418,21 @@ or for each command: $ lambda-cron create --help ``` +## Development + +To start working with **LambdaCron** you should clone the project, create a +virtualenv (optional) and install dependencies: + +``` bash +$ git clone https://github.com/MediaMath/lambda-cron.git +$ cd lambda-cron +$ virtualenv venv +$ source venv/bin/activate +$ pip install -r requirements-dev.txt +$ ./lambda_cron/lambda-cron --help +``` -## CONTRIBUTING +## Contributing Contributions are welcome. You can find open issues with some features and improvements that would be good to have in **LambdaCron**. From d08dc98b7502a313309dbe182a2c9f9506a6c1f8 Mon Sep 17 00:00:00 2001 From: Javier Bravo Date: Thu, 16 Mar 2017 21:26:16 +0000 Subject: [PATCH 3/4] Update README - move requirements --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 837965d..67ef2b4 100644 --- a/README.md +++ b/README.md @@ -350,17 +350,6 @@ task: It is a wrapper over [Requests](http://docs.python-requests.org/en/master/). All http methods will be supported soon. - -## Requirements - -* Python 2.7 -* boto3 -* pip -* AWS account -* awscli (configured) - -**LambdaCron** is based 100% on AWS cloud. - ## Frequency #### Execution time @@ -383,6 +372,16 @@ You can read in following [documentation](http://docs.aws.amazon.com/AmazonCloud Be aware of this. +# Requirements + +* Python 2.7 +* boto3 +* pip +* AWS account +* awscli (configured) + +**LambdaCron** is based 100% on AWS cloud. + ## Getting Started **Important!** The tool is not available in **pip** yet. If you want to try it, qcheck [Development](#Development) From 230ec85fb52e88656a98a079cb8f5add35f65617 Mon Sep 17 00:00:00 2001 From: Javier Bravo Date: Thu, 16 Mar 2017 21:28:48 +0000 Subject: [PATCH 4/4] update README - fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67ef2b4..e08ff19 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,7 @@ Be aware of this. ## Getting Started -**Important!** The tool is not available in **pip** yet. If you want to try it, qcheck [Development](#Development) +**Important!** The tool is not available in **pip** yet. If you want to try it, check [Development](#development) ### Install