Skip to content

Commit

Permalink
[Fixed] DatahubHepler params
Browse files Browse the repository at this point in the history
  • Loading branch information
stacy0416 committed May 3, 2021
1 parent 80fe22f commit 749fcfd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions afs2datasource/DBManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ def _get_credential_from_config(self, config):
'containers': containers
}
}
elif db_type == const.DB_TYPE['DATAHUB']:
dataDir = {
'type': db_type,
'data': {
'timeRange': config.get('timeRange'),
'timeLast': config.get('timeLast'),
'datahub_config': config.get('datahub_config'),
'datahub_url': config.get('datahub_url'),
'credential': {
'uri': config.get('mongouri'),
'influxuri': config.get('influxuri'),
},
'username': config.get('username'),
'password': config.get('password'),
}
}
else:
username = config.get('username', None)
password = config.get('password', None)
Expand Down

0 comments on commit 749fcfd

Please sign in to comment.