Commits

Ronny Pfannschmidt committed f43d270

fix cli, work around COUCHDB-1491

  • Participants
  • Parent commits 40abb53

Comments (0)

Files changed (2)

File couchdb_compose/__main__.py

         argv = sys.argv[1:]
     args = docopt(cli.__doc__, argv=argv)
     return doc_main(args, composer)
+
 if __name__ == '__main__':
     main()

File couchdb_compose/cli.py

        couchdb-compose deploy_views DATABASE [options]
        couchdb-compose drop_viewdata DATABASE [options]
 
+subcommands:
+    show           - show the ddoc
+    push           - push to the DATABASE
+    deploy_views   - deploy view updates (usefull before push)
+    drop_viewdata  - drop all view data and clean up the db
+
+options: 
     -h, --help      help
     --path PATH     different path for the default composer [default: ./]
     --deploy-views  deploy views before pushing the ddoc
         db.delete_doc(ddoc['id'])
     print('view cleanup')
     db.view_cleanup()
+    # restart to work around COUCHDB-1491
+    # - unexpected normal termination of viewserver
+    db.server.res.post('/_restart', headers={"Content-Type": "application/json"})
 
 def get_database(args):
     name_or_uri = args["DATABASE"]