|
4 | 4 | # --- BEGIN_HEADER --- |
5 | 5 | # |
6 | 6 | # grid_script - the core job handling daemon on a MiG server |
7 | | -# Copyright (C) 2003-2023 The MiG Project lead by Brian Vinter |
| 7 | +# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH |
8 | 8 | # |
9 | 9 | # This file is part of MiG. |
10 | 10 | # |
|
20 | 20 | # |
21 | 21 | # You should have received a copy of the GNU General Public License |
22 | 22 | # along with this program; if not, write to the Free Software |
23 | | -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 23 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
| 24 | +# USA. |
24 | 25 | # |
25 | 26 | # -- END_HEADER --- |
26 | 27 | # |
@@ -693,11 +694,9 @@ def graceful_shutdown(): |
693 | 694 | exe_job = \ |
694 | 695 | executing_queue.get_job_by_id(job_dict['JOB_ID' |
695 | 696 | ]) |
| 697 | + # Ignore missing fields |
| 698 | + (last_res, last_exe) = ('', '') |
696 | 699 | if exe_job: |
697 | | - |
698 | | - # Ignore missing fields |
699 | | - |
700 | | - (last_res, last_exe) = ('', '') |
701 | 700 | if 'UNIQUE_RESOURCE_NAME' in exe_job: |
702 | 701 | last_res = exe_job['UNIQUE_RESOURCE_NAME'] |
703 | 702 | if 'EXE' in exe_job: |
@@ -799,7 +798,8 @@ def graceful_shutdown(): |
799 | 798 |
|
800 | 799 | vgrids_in_prioritized_order = [] |
801 | 800 |
|
802 | | - list_indices = [(last_vgrid + i) % len(exe_vgrids) for i in range(len(exe_vgrids))] |
| 801 | + list_indices = [(last_vgrid + i) % len(exe_vgrids) |
| 802 | + for i in range(len(exe_vgrids))] |
803 | 803 | for index in list_indices: |
804 | 804 |
|
805 | 805 | # replace "" with default_vgrid |
|
0 commit comments