mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 01:02:09 -05:00
AWS scripts for celery
This commit is contained in:
12
aws_run_celery.py
Normal file
12
aws_run_celery.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from app import notify_celery, create_app
|
||||||
|
from credstash import getAllSecrets
|
||||||
|
import os
|
||||||
|
|
||||||
|
# on aws get secrets and export to env
|
||||||
|
secrets = getAllSecrets(region="eu-west-1")
|
||||||
|
for key, val in secrets.items():
|
||||||
|
os.environ[key] = val
|
||||||
|
|
||||||
|
application = create_app()
|
||||||
|
application.app_context().push()
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from app import notify_celery, create_app
|
from app import notify_celery, create_app
|
||||||
from credstash import getAllSecrets
|
|
||||||
import os
|
|
||||||
|
|
||||||
# on aws get secrets and export to env
|
|
||||||
secrets = getAllSecrets(region="eu-west-1")
|
|
||||||
for key, val in secrets.items():
|
|
||||||
os.environ[key] = val
|
|
||||||
|
|
||||||
application = create_app()
|
application = create_app()
|
||||||
application.app_context().push()
|
application.app_context().push()
|
||||||
|
|||||||
Reference in New Issue
Block a user