Skip to content

Commit 5fc8a80

Browse files
authored
Merge pull request #408 from HSF/dev
Dev
2 parents 16cd6e7 + 524f22c commit 5fc8a80

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

main/lib/idds/agents/carrier/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,10 @@ def handle_messages_processing(messages, logger=None, log_prefix='', update_proc
18181818
update_contents = []
18191819

18201820
for ori_msg in messages:
1821-
msg = json.loads(ori_msg)
1821+
if type(ori_msg) in [dict]:
1822+
msg = ori_msg
1823+
else:
1824+
msg = json.loads(ori_msg)
18221825
if 'taskid' not in msg or not msg['taskid']:
18231826
continue
18241827

main/lib/idds/orm/base/alembic/versions/6931b48500a2_add_campaign_group.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def upgrade() -> None:
7777
op.create_unique_constraint('REQUESTGROUP_CM_UQ', 'requests_group', ['campaign', 'campaign_scope', 'campaign_group', 'campaign_tag'], schema=schema)
7878
op.create_check_constraint('REQUESTGROUP_STATUS_ID_NN', 'requests_group', 'status IS NOT NULL', schema=schema)
7979
op.create_index('REQUESTGROUP_CM_NAME_IDX', 'requests_group', ['campaign', 'campaign_scope', 'campaign_group', 'campaign_tag'], unique=True, schema=schema)
80-
op.create_index('REQUESTGROUP_STATUS_SITE', 'requests_group', ['status', 'site', 'group_id']),
81-
op.create_index('REQUESTGROUP_STATUS_PRIO_IDX', 'requests_group', ['status', 'priority', 'group_id', 'locking', 'updated_at', 'next_poll_at', 'created_at']),
82-
op.create_index('REQUESTGROUP_STATUS_POLL_IDX', 'requests_group', ['status', 'priority', 'locking', 'updated_at', 'new_poll_period', 'update_poll_period', 'created_at', 'group_id'])
80+
op.create_index('REQUESTGROUP_STATUS_SITE', 'requests_group', ['status', 'site', 'group_id'], schema=schema),
81+
op.create_index('REQUESTGROUP_STATUS_PRIO_IDX', 'requests_group', ['status', 'priority', 'group_id', 'locking', 'updated_at', 'next_poll_at', 'created_at'], schema=schema),
82+
op.create_index('REQUESTGROUP_STATUS_POLL_IDX', 'requests_group', ['status', 'priority', 'locking', 'updated_at', 'new_poll_period', 'update_poll_period', 'created_at', 'group_id'], schema=schema)
8383

8484
# requests
8585
op.alter_column('requests', 'campaign_tag', type_=sa.String(100), schema=schema)
@@ -91,6 +91,11 @@ def downgrade() -> None:
9191
if context.get_context().dialect.name in ['oracle', 'mysql', 'postgresql']:
9292
schema = context.get_context().version_table_schema if context.get_context().version_table_schema else ''
9393

94+
# requests
95+
op.alter_column('requests', 'campaign_tag', type_=sa.String(20), schema=schema)
96+
op.drop_constraint('REQUESTS_GROUP_ID_FK', table_name='requests', schema=schema)
97+
op.drop_column('requests', 'group_id', schema=schema)
98+
9499
# requests_group
95100
op.drop_constraint('REQUESTGROUP_STATUS_ID_NN', table_name='requests_group', schema=schema)
96101
op.drop_constraint('REQUESTGROUP_CM_UQ', table_name='requests_group', schema=schema)
@@ -102,8 +107,3 @@ def downgrade() -> None:
102107
op.drop_index('REQUESTGROUP_STATUS_POLL_IDX', table_name='requests_group', schema=schema)
103108

104109
op.drop_table('requests_group', schema=schema)
105-
106-
# requests
107-
op.alter_column('requests', 'campaign_tag', type_=sa.String(20), schema=schema)
108-
op.drop_constraint('REQUESTS_GROUP_ID_FK', table_name='requests', schema=schema)
109-
op.drop_column('requests', 'group_id', schema=schema)

main/lib/idds/tests/panda_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
task_ids = [161489, 161496, 161502, 161508, 161514, 161520, 161526, 161532, 161538, 161544, 161550, 161556, 161562]
9191
task_ids = [3174, 3198, 3209, 3230, 3252, 3266, 3284, 3292, 3300, 3312, 3350, 3379, 3387]
9292
task_ids = [1548, 1555]
93+
task_ids = [3906, 4266, 4267, 4357, 4358, 4414, 4416, 4417, 4418]
9394
for task_id in task_ids:
9495
print("Killing %s" % task_id)
9596
ret = Client.killTask(task_id, verbose=True)

0 commit comments

Comments
 (0)