From 831d56f28cc1026124a10f265606a088dad40764 Mon Sep 17 00:00:00 2001 From: alongd Date: Sat, 15 Jun 2019 20:26:45 -0400 Subject: [PATCH] Relocated delete all ARC jobs to utils --- arc/utils/__init__.py | 1 + delete.py => arc/utils/delete.py | 2 +- ipython/delete all arc jobs.ipynb | 85 +++++++++++++++---------------- 3 files changed, 43 insertions(+), 45 deletions(-) rename delete.py => arc/utils/delete.py (94%) diff --git a/arc/utils/__init__.py b/arc/utils/__init__.py index 96c03db9a6..4c880266d8 100644 --- a/arc/utils/__init__.py +++ b/arc/utils/__init__.py @@ -2,3 +2,4 @@ # -*- coding: utf-8 -*- import scale +import delete diff --git a/delete.py b/arc/utils/delete.py similarity index 94% rename from delete.py rename to arc/utils/delete.py index 2404b4f22d..ea562381eb 100644 --- a/delete.py +++ b/arc/utils/delete.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function, unicode_literals) -from arc.main import delete_all_arc_jobs +from arc.common import delete_all_arc_jobs from arc.settings import servers ################################################################################ diff --git a/ipython/delete all arc jobs.ipynb b/ipython/delete all arc jobs.ipynb index b40d170c6f..1930378089 100644 --- a/ipython/delete all arc jobs.ipynb +++ b/ipython/delete all arc jobs.ipynb @@ -1,46 +1,43 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete all running ARC jobs from all servers (warning!!! use with caution!)" - ] + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "pycharm": {} + }, + "source": [ + "### Delete all running ARC jobs from all servers (warning!!! use with caution!)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "pycharm": {} + }, + "outputs": [], + "source": "from arc.utils.delete import delete_all_arc_jobs\n\nserver1 \u003d \u0027pharos\u0027\nserver2 \u003d \u0027rmg\u0027\n\ndelete_all_arc_jobs(server_list\u003d[server1, server2])" + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from arc.main import delete_all_arc_jobs\n", - "\n", - "server1 = 'pharos'\n", - "server2 = 'rmg'\n", - "\n", - "delete_all_arc_jobs(server_list=[server1, server2])" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.16" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + "nbformat": 4, + "nbformat_minor": 2 +} \ No newline at end of file