forked from mosip/mosip-token-seeder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
18 lines (14 loc) · 775 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import mosip_token_seeder
from mosip_token_seeder import authenticator, authtokenapi, tokenseeder
config = mosip_token_seeder.init_config()
app = mosip_token_seeder.init_app(config)
logger = mosip_token_seeder.init_logger(config)
scheduler = mosip_token_seeder.init_scheduler(app, config, logger)
if config.db.print_password_on_startup:
logger.info('DB Password: %s' % config.db.password)
mosip_authenticator = authenticator.initialize(config, logger)
token_seeder = tokenseeder.initialize(config, logger, mosip_authenticator)
authtokenapi.initialize(app, config, logger, token_seeder.request_id_queue, authenticator=mosip_authenticator)
if config.cleanup.enabled:
mosip_token_seeder.add_cleanup_job(scheduler, config, token_seeder.cleanup_old_entries)