Skip to content

Commit

Permalink
Merge pull request #69 from wguanicedew/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
tmaeno authored Mar 16, 2022
2 parents 012a503 + e162acf commit e0dfcb5
Show file tree
Hide file tree
Showing 27 changed files with 120 additions and 72 deletions.
2 changes: 1 addition & 1 deletion atlas/lib/idds/atlas/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# - Wen Guan, <[email protected]>, 2019 - 2021


release_version = "0.10.3"
release_version = "0.10.4"
14 changes: 7 additions & 7 deletions atlas/lib/idds/atlas/workflow/atlaspandawork.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def create_processing(self, input_output_maps=[]):

def submit_panda_task(self, processing):
try:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
task_param = proc.processing_metadata['task_param']
Expand Down Expand Up @@ -436,7 +436,7 @@ def submit_processing(self, processing):

def poll_panda_task_status(self, processing):
if 'processing' in processing['processing_metadata']:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
status, task_status = Client.getTaskStatus(proc.workload_id)
Expand Down Expand Up @@ -468,7 +468,7 @@ def get_processing_status_from_panda_status(self, task_status):
return processing_status

def get_panda_task_id(self, processing):
from pandatools import Client
from pandaclient import Client

start_time = datetime.datetime.utcnow() - datetime.timedelta(hours=10)
start_time = start_time.strftime('%Y-%m-%d %H:%M:%S')
Expand All @@ -494,7 +494,7 @@ def get_panda_task_id(self, processing):
def poll_panda_task(self, processing=None, input_output_maps=None):
task_id = None
try:
from pandatools import Client
from pandaclient import Client

if processing:
proc = processing['processing_metadata']['processing']
Expand Down Expand Up @@ -534,7 +534,7 @@ def poll_panda_task(self, processing=None, input_output_maps=None):
def kill_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -547,7 +547,7 @@ def kill_processing(self, processing):
def kill_processing_force(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -560,7 +560,7 @@ def kill_processing_force(self, processing):
def reactivate_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
# task_id = processing['processing_metadata']['task_id']
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
Expand Down
2 changes: 1 addition & 1 deletion atlas/lib/idds/atlas/workflowv2/atlasdagwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def create_processing(self, input_output_maps):

def submit_panda_task(self, processing):
try:
from pandatools import Client
from pandaclient import Client

task_param = processing['processing_metadata']['task_param']
return_code = Client.insertTaskParams(task_param, verbose=True)
Expand Down
2 changes: 1 addition & 1 deletion atlas/lib/idds/atlas/workflowv2/atlaslocalpandawork.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_rucio_download_client(self):
def poll_panda_task_output(self, processing=None, input_output_maps=None):
task_id = None
try:
from pandatools import Client
from pandaclient import Client

if processing:
output_metadata = {}
Expand Down
14 changes: 7 additions & 7 deletions atlas/lib/idds/atlas/workflowv2/atlaspandawork.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def create_processing(self, input_output_maps=[]):

def submit_panda_task(self, processing):
try:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
task_param = proc.processing_metadata['task_param']
Expand Down Expand Up @@ -498,7 +498,7 @@ def submit_processing(self, processing):

def poll_panda_task_status(self, processing):
if 'processing' in processing['processing_metadata']:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
status, task_status = Client.getTaskStatus(proc.workload_id)
Expand Down Expand Up @@ -530,7 +530,7 @@ def get_processing_status_from_panda_status(self, task_status):
return processing_status

def get_panda_task_id(self, processing):
from pandatools import Client
from pandaclient import Client

start_time = datetime.datetime.utcnow() - datetime.timedelta(hours=10)
start_time = start_time.strftime('%Y-%m-%d %H:%M:%S')
Expand All @@ -556,7 +556,7 @@ def get_panda_task_id(self, processing):
def poll_panda_task(self, processing=None, input_output_maps=None):
task_id = None
try:
from pandatools import Client
from pandaclient import Client

if processing:
proc = processing['processing_metadata']['processing']
Expand Down Expand Up @@ -596,7 +596,7 @@ def poll_panda_task(self, processing=None, input_output_maps=None):
def kill_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -609,7 +609,7 @@ def kill_processing(self, processing):
def kill_processing_force(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -622,7 +622,7 @@ def kill_processing_force(self, processing):
def reactivate_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
# task_id = processing['processing_metadata']['task_id']
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
Expand Down
4 changes: 2 additions & 2 deletions atlas/tools/env/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
- nose # nose test tools
- rucio-clients
- rucio-clients-atlas
- idds-common==0.10.3
- idds-workflow==0.10.3
- idds-common==0.10.4
- idds-workflow==0.10.4
2 changes: 1 addition & 1 deletion client/lib/idds/client/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# - Wen Guan, <[email protected]>, 2019 - 2021


release_version = "0.10.3"
release_version = "0.10.4"
4 changes: 2 additions & 2 deletions client/tools/env/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ dependencies:
- pytest # python testing tool
- nose # nose test tools
- tabulate
- idds-common==0.10.3
- idds-workflow==0.10.3
- idds-common==0.10.4
- idds-workflow==0.10.4
3 changes: 2 additions & 1 deletion common/lib/idds/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://www.apache.org/licenses/LICENSE-2.0OA
#
# Authors:
# - Wen Guan, <[email protected]>, 2019 - 2020
# - Wen Guan, <[email protected]>, 2019 - 2022

"""
Constants.
Expand Down Expand Up @@ -314,6 +314,7 @@ class ProcessingStatus(IDDSEnum):
TimeOut = 23
ToFinish = 24
ToForceFinish = 25
Broken = 26


class ProcessingLocking(IDDSEnum):
Expand Down
2 changes: 1 addition & 1 deletion common/lib/idds/common/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# - Wen Guan, <[email protected]>, 2019 - 2021


release_version = "0.10.3"
release_version = "0.10.4"
2 changes: 1 addition & 1 deletion doma/lib/idds/doma/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# - Wen Guan, <[email protected]>, 2020 - 2021


release_version = "0.10.3"
release_version = "0.10.4"
22 changes: 11 additions & 11 deletions doma/lib/idds/doma/workflow/domapandawork.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def create_processing(self, input_output_maps=[]):

def submit_panda_task(self, processing):
try:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
task_param = proc.processing_metadata['task_param']
Expand Down Expand Up @@ -462,7 +462,7 @@ def submit_processing(self, processing):
proc.submitted_at = datetime.datetime.utcnow()

def get_panda_task_id(self, processing):
from pandatools import Client
from pandaclient import Client

start_time = datetime.datetime.utcnow() - datetime.timedelta(hours=10)
start_time = start_time.strftime('%Y-%m-%d %H:%M:%S')
Expand All @@ -487,7 +487,7 @@ def get_panda_task_id(self, processing):

def poll_panda_task_status(self, processing):
if 'processing' in processing['processing_metadata']:
from pandatools import Client
from pandaclient import Client

proc = processing['processing_metadata']['processing']
status, task_status = Client.getTaskStatus(proc.workload_id)
Expand Down Expand Up @@ -641,7 +641,7 @@ def get_update_contents_from_map_id(self, map_id, input_output_maps, job_info):

def map_panda_ids(self, unregistered_job_ids, input_output_maps):
self.logger.debug("map_panda_ids, unregistered_job_ids[:10]: %s" % str(unregistered_job_ids[:10]))
from pandatools import Client
from pandaclient import Client

# updated_map_ids = []
full_update_contents = []
Expand Down Expand Up @@ -669,7 +669,7 @@ def map_panda_ids(self, unregistered_job_ids, input_output_maps):

def get_status_changed_contents(self, unterminated_job_ids, input_output_maps, panda_id_to_map_ids):
self.logger.debug("get_status_changed_contents, unterminated_job_ids[:10]: %s" % str(unterminated_job_ids[:10]))
from pandatools import Client
from pandaclient import Client

full_update_contents = []
chunksize = 2000
Expand Down Expand Up @@ -698,7 +698,7 @@ def get_final_update_contents(self, input_output_maps):
def poll_panda_task_old(self, processing=None, input_output_maps=None):
task_id = None
try:
from pandatools import Client
from pandaclient import Client

jobs_ids = None
if processing:
Expand Down Expand Up @@ -769,7 +769,7 @@ def poll_panda_task_old(self, processing=None, input_output_maps=None):
def poll_panda_jobs(self, job_ids):
job_ids = list(job_ids)
self.logger.debug("poll_panda_jobs, poll_panda_jobs_chunk_size: %s, job_ids[:10]: %s" % (self.poll_panda_jobs_chunk_size, str(job_ids[:10])))
from pandatools import Client
from pandaclient import Client

# updated_map_ids = []
inputname_jobid_map = {}
Expand Down Expand Up @@ -874,7 +874,7 @@ def get_update_contents(self, inputnames, inputname_mapid_map, inputname_jobid_m
def poll_panda_task(self, processing=None, input_output_maps=None):
task_id = None
try:
from pandatools import Client
from pandaclient import Client

if processing:
proc = processing['processing_metadata']['processing']
Expand Down Expand Up @@ -971,7 +971,7 @@ def poll_panda_task(self, processing=None, input_output_maps=None):
def kill_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -984,7 +984,7 @@ def kill_processing(self, processing):
def kill_processing_force(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
# task_id = processing['processing_metadata']['task_id']
Expand All @@ -997,7 +997,7 @@ def kill_processing_force(self, processing):
def reactivate_processing(self, processing):
try:
if processing:
from pandatools import Client
from pandaclient import Client
# task_id = processing['processing_metadata']['task_id']
proc = processing['processing_metadata']['processing']
task_id = proc.workload_id
Expand Down
Loading

0 comments on commit e0dfcb5

Please sign in to comment.