summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--cron/.gitignore2
-rw-r--r--cron/serverless.yml5
3 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index b70ac19..c512e13 100644
--- a/README.md
+++ b/README.md
@@ -32,8 +32,19 @@ Deployment is handled transparently via Netlify.
### Cron Task
+#### Dev
+
+```bash
+$ cd cron
+$ python -m venv venv
+$ source venv/bin/activate
+$ pip install requests-ntlm
+```
+
#### Deploy
+The `venv` must be populated with packages before deployment, then:
+
```bash
$ yarn run deploycron
```
diff --git a/cron/.gitignore b/cron/.gitignore
index 22e4d37..0965ab7 100644
--- a/cron/.gitignore
+++ b/cron/.gitignore
@@ -1,6 +1,7 @@
# Distribution / packaging
.Python
env/
+venv/
build/
develop-eggs/
dist/
@@ -15,6 +16,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
+.env
__pycache__
*.pyc
diff --git a/cron/serverless.yml b/cron/serverless.yml
index e2d8764..bc913ca 100644
--- a/cron/serverless.yml
+++ b/cron/serverless.yml
@@ -2,7 +2,7 @@ service: cron
provider:
name: aws
- runtime: python3.7
+ runtime: python3.8
region: eu-west-1
memorySize: 128
timeout: 20
@@ -19,3 +19,6 @@ functions:
handler: handler.update
events:
- schedule: rate(1 minute)
+ package:
+ include:
+ - venv/lib/python3.8/site-packages/**