mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Add function to retrieve survey configurations from DB.
As the survey definitions will no longer be stored in files under etc/surveys/ but directly on the database, this function replaces configuration.surveys()
This commit is contained in:
@@ -20,12 +20,11 @@ from datastore import Datastore
|
||||
if __name__ == '__main__':
|
||||
|
||||
print("Reading configuration")
|
||||
surveys = configuration.surveys()
|
||||
file_min_age = configuration.read().get('imports', {}).get('file_min_age', 10)
|
||||
|
||||
print("Connecting to database")
|
||||
db = Datastore()
|
||||
db.connect()
|
||||
surveys = db.surveys()
|
||||
|
||||
print("Reading surveys")
|
||||
for survey in surveys:
|
||||
|
||||
Reference in New Issue
Block a user