Updates to maintenance script for EBS compatibility
parent
c1e7fa936c
commit
386a8515a7
|
@ -2,4 +2,8 @@
|
|||
config.yaml
|
||||
*.pyc
|
||||
*.xml
|
||||
*.code-workspace
|
||||
*.code-workspace
|
||||
# Elastic Beanstalk Files
|
||||
.elasticbeanstalk/*
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
||||
|
|
5
main.py
5
main.py
|
@ -77,7 +77,10 @@ def loadConfig():
|
|||
|
||||
if __name__ == '__main__':
|
||||
args = parseArgs()
|
||||
loadConfig()
|
||||
try:
|
||||
loadConfig()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
main(
|
||||
secondsAgo=args.time,
|
||||
year=args.year,
|
||||
|
|
|
@ -45,9 +45,7 @@ class Renewal(BaseDoc):
|
|||
claimants = Nested(Claimant)
|
||||
|
||||
class Index:
|
||||
with open('config.yaml', 'r') as yamlFile:
|
||||
config = yaml.safe_load(yamlFile)
|
||||
name = config['ELASTICSEARCH']['ES_CCR_INDEX']
|
||||
name = os.environ['ES_CCR_INDEX']
|
||||
|
||||
|
||||
class CCE(BaseDoc):
|
||||
|
@ -60,6 +58,4 @@ class CCE(BaseDoc):
|
|||
registrations = Nested(Registration)
|
||||
|
||||
class Index:
|
||||
with open('config.yaml', 'r') as yamlFile:
|
||||
config = yaml.safe_load(yamlFile)
|
||||
name = config['ELASTICSEARCH']['ES_CCE_INDEX']
|
||||
name = os.environ['ES_CCE_INDEX']
|
||||
|
|
Loading…
Reference in New Issue