mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-26 09:26:22 +00:00
add license header; include RUNNING chains from SO_JOB_QUEUE for Appworx
This commit is contained in:
parent
5378d59933
commit
91c5ac8f1d
@ -118,9 +118,14 @@ class AppworxExtract:
|
||||
"""SELECT J.*, R.RUNS
|
||||
FROM SO_JOB_TABLE J JOIN (
|
||||
SELECT SO_JOB_SEQ, COUNT(*) as RUNS
|
||||
FROM SO_JOB_HISTORY
|
||||
WHERE cast((FROM_TZ(CAST(SO_JOB_FINISHED as timestamp), 'US/Pacific') at time zone 'GMT') as date) >=
|
||||
(TO_DATE('1970-01-01','YYYY-MM-DD') + (%d - 3600) / 86400)
|
||||
FROM
|
||||
( SELECT SO_JOB_SEQ FROM SO_JOB_HISTORY
|
||||
WHERE cast((FROM_TZ(CAST(SO_JOB_FINISHED as timestamp), 'US/Pacific') at time zone 'GMT') as date)
|
||||
>= (TO_DATE('1970-01-01','YYYY-MM-DD') + (%d - 3600) / 86400)
|
||||
UNION ALL
|
||||
SELECT SO_JOB_SEQ FROM SO_JOB_QUEUE
|
||||
WHERE SO_STATUS_NAME IN ('RUNNING', 'FINISHED')
|
||||
)
|
||||
GROUP BY SO_JOB_SEQ
|
||||
) R ON J.SO_JOB_SEQ = R.SO_JOB_SEQ
|
||||
WHERE SO_COMMAND_TYPE = 'CHAIN'
|
||||
@ -130,8 +135,13 @@ class AppworxExtract:
|
||||
"""SELECT J.*, R.RUNS
|
||||
FROM SO_JOB_TABLE J JOIN (
|
||||
SELECT SO_JOB_SEQ, COUNT(*) as RUNS
|
||||
FROM SO_JOB_HISTORY
|
||||
WHERE SO_JOB_FINISHED >= SYSDATE - %d
|
||||
FROM
|
||||
( SELECT SO_JOB_SEQ FROM SO_JOB_HISTORY
|
||||
WHERE SO_JOB_FINISHED >= SYSDATE - %d
|
||||
UNION ALL
|
||||
SELECT SO_JOB_SEQ FROM SO_JOB_QUEUE
|
||||
WHERE SO_STATUS_NAME IN ('RUNNING', 'FINISHED')
|
||||
)
|
||||
GROUP BY SO_JOB_SEQ
|
||||
) R ON J.SO_JOB_SEQ = R.SO_JOB_SEQ
|
||||
WHERE SO_COMMAND_TYPE = 'CHAIN'
|
||||
@ -140,7 +150,8 @@ class AppworxExtract:
|
||||
"""SELECT d.SO_TASK_NAME, d.SO_CHAIN_ORDER, d.SO_PREDECESSORS as PREDECESSORS, d.SO_DET_SEQ as JOB_ID,
|
||||
t.* FROM SO_CHAIN_DETAIL d
|
||||
JOIN SO_JOB_TABLE t ON d.SO_JOB_SEQ = t.SO_JOB_SEQ
|
||||
WHERE d.SO_CHAIN_SEQ = %d ORDER BY d.SO_CHAIN_ORDER
|
||||
WHERE d.SO_CHAIN_SEQ = %d
|
||||
ORDER BY d.SO_CHAIN_ORDER
|
||||
"""
|
||||
self.aw_cursor.execute(query)
|
||||
rows = DbUtil.dict_cursor(self.aw_cursor)
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package controllers.api.v1;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package dao;
|
||||
|
||||
import java.sql.Types;
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package dao;
|
||||
|
||||
import models.ScriptInfo;
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package dao;
|
||||
|
||||
import models.ScriptLineage;
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package dao;
|
||||
|
||||
import models.ScriptRuntime;
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package models;
|
||||
|
||||
public class ScriptInfo {
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package models;
|
||||
|
||||
public class ScriptLineage {
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
/**
|
||||
* Copyright 2015 LinkedIn Corp. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
package models;
|
||||
|
||||
public class ScriptRuntime {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user