code: def refresh_druid(datasource, merge):
      
      session = db.session()
      from superset.connectors.druid.models import DruidCluster
      for cluster in session.query(DruidCluster).all():
          try:
              cluster.refresh_datasources(datasource_name=datasource,
                                          merge_flag=merge)
          except Exception as e:
              print(
                  "Error while processing cluster '{}'\n{}".format(
                      cluster, str(e)))
              logging.exception(e)
          cluster.metadata_last_refreshed = datetime.now()
          print(
              'Refreshed metadata from cluster '
              '[' + cluster.cluster_name + ']')
      session.commit()
docs: Refresh druid datasources