diff options
Diffstat (limited to 'kpov_judge/rm_task.py')
-rwxr-xr-x | kpov_judge/rm_task.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kpov_judge/rm_task.py b/kpov_judge/rm_task.py index 0856a5d..8433f29 100755 --- a/kpov_judge/rm_task.py +++ b/kpov_judge/rm_task.py @@ -16,12 +16,7 @@ if __name__ == '__main__': print("Usage: {0} [task_name]".format(sys.argv[0])) exit(1) task_id = sys.argv[1] - db = pymongo.MongoClient(settings.DB_HOST).kpov - try: - db.authenticate(settings.USERNAME, settings.PASSWORD) - except Exception as e: - print("Not authenticated:"+str(e)) - #no auth or auth config? + db = pymongo.MongoClient(settings.DB_URI).get_default_database() db.computers_meta.remove({'task_id': task_id}) db.networks.remove({'task_id': task_id}) db.task_checkers.remove({'task_id': task_id}) |