datatailr 0.1.19__py3-none-any.whl → 0.1.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datatailr might be problematic. Click here for more details.
- datatailr/excel.py +19 -0
- datatailr/sbin/datatailr_run.py +5 -2
- datatailr/sbin/datatailr_run_batch.py +0 -1
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/METADATA +1 -1
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/RECORD +9 -8
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/WHEEL +0 -0
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/entry_points.txt +0 -0
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/licenses/LICENSE +0 -0
- {datatailr-0.1.19.dist-info → datatailr-0.1.21.dist-info}/top_level.txt +0 -0
datatailr/excel.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from dt.excel import Addin
|
|
3
|
+
except ImportError:
|
|
4
|
+
|
|
5
|
+
class DummyAddin:
|
|
6
|
+
def __init__(self, name: str, description: str) -> None:
|
|
7
|
+
self.name = name
|
|
8
|
+
self.description = description
|
|
9
|
+
|
|
10
|
+
def expose(self, **kwargs):
|
|
11
|
+
def decorator(func):
|
|
12
|
+
return func
|
|
13
|
+
|
|
14
|
+
return decorator
|
|
15
|
+
|
|
16
|
+
def run(self):
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
Addin = DummyAddin
|
datatailr/sbin/datatailr_run.py
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
import os
|
|
37
|
+
import sys
|
|
37
38
|
from typing import Tuple
|
|
38
39
|
from datatailr.logging import DatatailrLogger
|
|
39
40
|
from datatailr.dt_json import encode_json
|
|
@@ -86,11 +87,13 @@ def run_command_as_user(command: str, user: str, env_vars: dict):
|
|
|
86
87
|
env_vars_str = " ".join(f"{key}='{value}'" for key, value in env_vars.items())
|
|
87
88
|
full_command = f"sudo -u {user} {env_vars_str} {command}"
|
|
88
89
|
logger.debug(f"Running command: {full_command}")
|
|
89
|
-
os.system(full_command)
|
|
90
|
+
status = os.system(full_command)
|
|
91
|
+
if status != 0:
|
|
92
|
+
logger.error(f"Command failed with status {status / 256:g}")
|
|
93
|
+
sys.exit(1)
|
|
90
94
|
|
|
91
95
|
|
|
92
96
|
def main():
|
|
93
|
-
logger.info(f"Env inside datatailr_run.py: {os.environ}")
|
|
94
97
|
user, _ = create_user_and_group()
|
|
95
98
|
job_type = get_env_var("DATATAILR_JOB_TYPE")
|
|
96
99
|
|
|
@@ -19,7 +19,6 @@ logger = DatatailrLogger(os.path.abspath(__file__)).get_logger()
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def run():
|
|
22
|
-
logger.info(f"Env inside datatailr_run_batch.py run(): {os.environ}")
|
|
23
22
|
logger.info("Running Datatailr batch job")
|
|
24
23
|
entry_point = os.environ.get("DATATAILR_BATCH_ENTRYPOINT")
|
|
25
24
|
batch_run_id = os.environ.get("DATATAILR_BATCH_RUN_ID")
|
|
@@ -3,6 +3,7 @@ datatailr/acl.py,sha256=tlDy6VlHinSy5W1FbVxcNQNi7FliWUXy3ssIbzaPp28,4157
|
|
|
3
3
|
datatailr/blob.py,sha256=xkXT6RZcMww4YfLVjOyqvvPxWc-Ku6fTJ_PeCXyBys4,3159
|
|
4
4
|
datatailr/dt_json.py,sha256=3xmTqDBk68oPl2UW8UVOYPaBw4lAsVg6nDLwcen5nuo,2252
|
|
5
5
|
datatailr/errors.py,sha256=p_e4ao3sFEfz1g4LvEDqw6bVzHJPJSINLjJ8H6_PqOo,751
|
|
6
|
+
datatailr/excel.py,sha256=YqIkaM5ap6uKj92yH6YGoB6I1oN10S-1zl5Uf9_xXx4,409
|
|
6
7
|
datatailr/group.py,sha256=ExsrkqUooAfFLWKvnkp1ZxisSJD1yCp9TKqoCXDCwhs,4360
|
|
7
8
|
datatailr/logging.py,sha256=4Rsx3wf2tAr1334E2goBjhC877RwbUNaFgBlh902vU4,3270
|
|
8
9
|
datatailr/user.py,sha256=tY6TcwOvq1SW6Uqot6eYR3SBAihPwWKs2qDfHDvF4xw,6624
|
|
@@ -11,9 +12,9 @@ datatailr/version.py,sha256=N9K8ZxlwFFSz8XSgbgaTWZY4k2J0JKfj698nZ_O2pIU,536
|
|
|
11
12
|
datatailr/wrapper.py,sha256=K9ZD76cWey_ikA6C5sKejwRaYBDln4QMg-RcoRGiuFc,7991
|
|
12
13
|
datatailr/build/__init__.py,sha256=_dA7b4L6wsaAFaSxUoYSJ1oaRqDHDMR20kqoCocSOss,487
|
|
13
14
|
datatailr/build/image.py,sha256=YC8ML-l-sj6TcIBY-DCx_vaeI_7SmL9fPFhHnuxzRh0,5509
|
|
14
|
-
datatailr/sbin/datatailr_run.py,sha256=
|
|
15
|
+
datatailr/sbin/datatailr_run.py,sha256=_P2q0-i3JS0sPt49eX_EhjPxCrJyfi9-FGoYcqND4Zs,6307
|
|
15
16
|
datatailr/sbin/datatailr_run_app.py,sha256=AOkutzv4DeKfWZs-ZBciAMKnK4A05SfkVf1ZJnSSFwA,1231
|
|
16
|
-
datatailr/sbin/datatailr_run_batch.py,sha256=
|
|
17
|
+
datatailr/sbin/datatailr_run_batch.py,sha256=UWnp96j_G66R_Cape7Bb-rbK6UBLF7Y5_mTlWyGJAVQ,1818
|
|
17
18
|
datatailr/sbin/datatailr_run_excel.py,sha256=Gr_QZgqJrwgRVD9_o4v-2tbvU-QMvNHL7xUvFGhftFc,1163
|
|
18
19
|
datatailr/sbin/datatailr_run_service.py,sha256=R8eNLN2SGnMtyfLy3vq9isUHr3dRzeBqESTquNK9Iho,1156
|
|
19
20
|
datatailr/scheduler/__init__.py,sha256=qydHYVtEP6SUWd2CQ6FRdTdRWNz3SbYPJy4FK_wOvMk,1772
|
|
@@ -24,9 +25,9 @@ datatailr/scheduler/batch_decorator.py,sha256=LqL1bsupWLn-YEQUvFJYae7R3ogrL5-Vod
|
|
|
24
25
|
datatailr/scheduler/constants.py,sha256=5WWTsfwZ_BA8gVDOTa2AQX9DJ0NzfaWgtY3vrODS2-8,606
|
|
25
26
|
datatailr/scheduler/schedule.py,sha256=0XJJen2nL1xplRs0Xbjwgq3T-0bFCOrJzkSALdio998,3741
|
|
26
27
|
datatailr/scheduler/utils.py,sha256=up6oR2iwe6G52LkvgfO394xchXgCYNjOMGRQW3e8PQk,1082
|
|
27
|
-
datatailr-0.1.
|
|
28
|
-
datatailr-0.1.
|
|
29
|
-
datatailr-0.1.
|
|
30
|
-
datatailr-0.1.
|
|
31
|
-
datatailr-0.1.
|
|
32
|
-
datatailr-0.1.
|
|
28
|
+
datatailr-0.1.21.dist-info/licenses/LICENSE,sha256=ikKP4_O-UD_b8FuNdKmbzTb6odd0JX085ZW_FAPN3VI,1066
|
|
29
|
+
datatailr-0.1.21.dist-info/METADATA,sha256=b1iOwgH34LZmK3e-D1gBtAhLjCmuvlW_Ip-D4LYWN6I,5146
|
|
30
|
+
datatailr-0.1.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
datatailr-0.1.21.dist-info/entry_points.txt,sha256=YqXfk2At-olW4PUSRkqvy_O3Mbv7uTKCCPuAAiz3Qbg,312
|
|
32
|
+
datatailr-0.1.21.dist-info/top_level.txt,sha256=75gntW0X_SKpqxLL6hAPipvpk28GAhJBvoyqN_HohWU,10
|
|
33
|
+
datatailr-0.1.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|