arpakitlib 1.7.29__py3-none-any.whl → 1.7.32__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.
- arpakitlib/_arpakit_project_template/src/api/create_api_app.py +75 -31
- arpakitlib/_arpakit_project_template/src/api/event.py +2 -2
- arpakitlib/_arpakit_project_template/src/core/settings.py +10 -0
- arpakitlib/_arpakit_project_template/src/operation_execution/__init__.py +0 -0
- arpakitlib/_arpakit_project_template/src/{core → operation_execution}/operation_executor.py +2 -0
- arpakitlib/_arpakit_project_template/src/operation_execution/scheduled_operations.py +12 -0
- arpakitlib/ar_fastapi_util.py +3 -3
- arpakitlib/ar_operation_execution_util.py +14 -12
- arpakitlib/ar_sqlalchemy_model_util.py +6 -5
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/METADATA +35 -2
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/RECORD +15 -14
- arpakitlib/_arpakit_project_template/src/core/scheduled_operations.py +0 -12
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/LICENSE +0 -0
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/NOTICE +0 -0
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/WHEEL +0 -0
- {arpakitlib-1.7.29.dist-info → arpakitlib-1.7.32.dist-info}/entry_points.txt +0 -0
@@ -1,13 +1,20 @@
|
|
1
1
|
from fastapi import FastAPI
|
2
2
|
|
3
|
+
from arpakitlib.ar_base_worker_util import BaseWorker
|
3
4
|
from arpakitlib.ar_fastapi_util import create_fastapi_app, InitSqlalchemyDBStartupAPIEvent, InitFileStoragesInDir, \
|
4
|
-
create_handle_exception,
|
5
|
-
|
5
|
+
create_handle_exception, create_story_log_before_response_in_handle_exception, _DEFAULT_CONTACT, \
|
6
|
+
SafeRunWorkerStartupAPIEvent
|
7
|
+
from arpakitlib.ar_operation_execution_util import ExecuteOperationWorker, CreateScheduledOperationWorker
|
8
|
+
from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
|
9
|
+
from arpakitlib.ar_type_util import raise_for_type
|
10
|
+
from src.api.event import StartupAPIEvent, ShutdownAPIEvent
|
6
11
|
from src.api.router.v1.main_router import api_v1_main_router
|
7
12
|
from src.api.transmitted_api_data import TransmittedAPIData
|
8
13
|
from src.core.settings import get_cached_settings
|
9
14
|
from src.core.util import get_cached_sqlalchemy_db, get_cached_media_file_storage_in_dir, \
|
10
15
|
get_cached_cache_file_storage_in_dir, get_cached_dump_file_storage_in_dir, setup_logging
|
16
|
+
from src.operation_execution.operation_executor import OperationExecutor
|
17
|
+
from src.operation_execution.scheduled_operations import ALL_SCHEDULED_OPERATIONS
|
11
18
|
|
12
19
|
|
13
20
|
def create_api_app() -> FastAPI:
|
@@ -15,40 +22,77 @@ def create_api_app() -> FastAPI:
|
|
15
22
|
|
16
23
|
settings = get_cached_settings()
|
17
24
|
sqlalchemy_db = get_cached_sqlalchemy_db() if settings.sql_db_url is not None else None
|
18
|
-
|
19
25
|
transmitted_api_data = TransmittedAPIData(
|
20
|
-
settings=
|
26
|
+
settings=settings,
|
21
27
|
sqlalchemy_db=sqlalchemy_db
|
22
28
|
)
|
23
29
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
funcs_before_response = []
|
31
|
+
if settings.api_create_story_log_before_response_in_handle_exception:
|
32
|
+
raise_for_type(sqlalchemy_db, SQLAlchemyDB)
|
33
|
+
funcs_before_response.append(
|
34
|
+
create_story_log_before_response_in_handle_exception(sqlalchemy_db=sqlalchemy_db)
|
35
|
+
)
|
36
|
+
handle_exception = create_handle_exception(
|
37
|
+
funcs_before_response=funcs_before_response,
|
38
|
+
async_funcs_after_response=[]
|
39
|
+
)
|
40
|
+
|
41
|
+
startup_api_events = [
|
42
|
+
InitFileStoragesInDir(
|
43
|
+
file_storages_in_dir=[
|
44
|
+
get_cached_media_file_storage_in_dir() if settings.media_dirpath is not None else None,
|
45
|
+
get_cached_cache_file_storage_in_dir() if settings.cache_dirpath is not None else None,
|
46
|
+
get_cached_dump_file_storage_in_dir() if settings.dump_dirpath is not None else None
|
47
|
+
]
|
34
48
|
),
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
StartupAPIEvent(transmitted_api_data=transmitted_api_data),
|
50
|
+
]
|
51
|
+
|
52
|
+
if settings.api_init_sql_db_at_start:
|
53
|
+
raise_for_type(sqlalchemy_db, SQLAlchemyDB)
|
54
|
+
startup_api_events.append(InitSqlalchemyDBStartupAPIEvent(sqlalchemy_db=sqlalchemy_db))
|
55
|
+
|
56
|
+
if settings.api_start_execute_operation_worker:
|
57
|
+
raise_for_type(sqlalchemy_db, SQLAlchemyDB)
|
58
|
+
startup_api_events.append(
|
59
|
+
SafeRunWorkerStartupAPIEvent(
|
60
|
+
workers=[
|
61
|
+
ExecuteOperationWorker(
|
62
|
+
sqlalchemy_db=sqlalchemy_db,
|
63
|
+
operation_executor=OperationExecutor(sqlalchemy_db=sqlalchemy_db),
|
64
|
+
filter_operation_types=None
|
65
|
+
)
|
66
|
+
],
|
67
|
+
safe_run_in_background_mode=BaseWorker.SafeRunInBackgroundModes.async_task
|
68
|
+
)
|
69
|
+
)
|
70
|
+
|
71
|
+
if settings.api_start_create_scheduled_operation_worker:
|
72
|
+
raise_for_type(sqlalchemy_db, SQLAlchemyDB)
|
73
|
+
startup_api_events.append(
|
74
|
+
SafeRunWorkerStartupAPIEvent(
|
75
|
+
workers=[
|
76
|
+
CreateScheduledOperationWorker(
|
77
|
+
sqlalchemy_db=sqlalchemy_db,
|
78
|
+
scheduled_operations=ALL_SCHEDULED_OPERATIONS
|
79
|
+
)
|
80
|
+
],
|
81
|
+
safe_run_in_background_mode=BaseWorker.SafeRunInBackgroundModes.async_task
|
82
|
+
)
|
83
|
+
)
|
84
|
+
|
85
|
+
shutdown_api_events = [
|
86
|
+
ShutdownAPIEvent(transmitted_api_data=transmitted_api_data)
|
87
|
+
]
|
88
|
+
|
89
|
+
api_app = create_fastapi_app(
|
90
|
+
title=settings.api_title.strip(),
|
91
|
+
description=settings.api_description.strip(),
|
92
|
+
log_filepath=settings.log_filepath,
|
93
|
+
handle_exception_=handle_exception,
|
94
|
+
startup_api_events=startup_api_events,
|
95
|
+
shutdown_api_events=shutdown_api_events,
|
52
96
|
transmitted_api_data=transmitted_api_data,
|
53
97
|
main_api_router=api_v1_main_router,
|
54
98
|
contact=_DEFAULT_CONTACT,
|
@@ -6,7 +6,7 @@ from src.api.transmitted_api_data import TransmittedAPIData
|
|
6
6
|
_logger = logging.getLogger(__name__)
|
7
7
|
|
8
8
|
|
9
|
-
class
|
9
|
+
class StartupAPIEvent(BaseStartupAPIEvent):
|
10
10
|
def __init__(self, transmitted_api_data: TransmittedAPIData):
|
11
11
|
super().__init__()
|
12
12
|
self.transmitted_api_data = transmitted_api_data
|
@@ -15,7 +15,7 @@ class FirstStartupAPIEvent(BaseStartupAPIEvent):
|
|
15
15
|
self._logger.info(self.__class__.__name__)
|
16
16
|
|
17
17
|
|
18
|
-
class
|
18
|
+
class ShutdownAPIEvent(BaseShutdownAPIEvent):
|
19
19
|
def __init__(self, transmitted_api_data: TransmittedAPIData):
|
20
20
|
super().__init__()
|
21
21
|
self.transmitted_api_data = transmitted_api_data
|
@@ -16,6 +16,16 @@ class Settings(SimpleSettings):
|
|
16
16
|
|
17
17
|
api_init_sql_db_at_start: bool = False
|
18
18
|
|
19
|
+
api_title: str = "{PROJECT_NAME}"
|
20
|
+
|
21
|
+
api_description: str = "{PROJECT_NAME} (arpakitlib)"
|
22
|
+
|
23
|
+
api_create_story_log_before_response_in_handle_exception: bool = True
|
24
|
+
|
25
|
+
api_start_execute_operation_worker: bool = False
|
26
|
+
|
27
|
+
api_start_create_scheduled_operation_worker: bool = False
|
28
|
+
|
19
29
|
var_dirname: str | None = "var"
|
20
30
|
|
21
31
|
var_dirpath: str | None = os.path.join(BASE_DIRPATH, var_dirname)
|
File without changes
|
@@ -5,8 +5,10 @@ from arpakitlib.ar_sqlalchemy_model_util import OperationDBM
|
|
5
5
|
class OperationExecutor(BaseOperationExecutor):
|
6
6
|
def sync_execute_operation(self, operation_dbm: OperationDBM) -> OperationDBM:
|
7
7
|
operation_dbm = super().sync_execute_operation(operation_dbm=operation_dbm)
|
8
|
+
# ...
|
8
9
|
return operation_dbm
|
9
10
|
|
10
11
|
async def async_execute_operation(self, operation_dbm: OperationDBM) -> OperationDBM:
|
11
12
|
operation_dbm = await super().async_execute_operation(operation_dbm=operation_dbm)
|
13
|
+
# ...
|
12
14
|
return operation_dbm
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from arpakitlib.ar_operation_execution_util import ScheduledOperation
|
2
|
+
|
3
|
+
from arpakitlib.ar_sqlalchemy_model_util import BaseOperationTypes
|
4
|
+
|
5
|
+
ALL_SCHEDULED_OPERATIONS = []
|
6
|
+
|
7
|
+
operation_healthcheck = ScheduledOperation(
|
8
|
+
type=BaseOperationTypes.healthcheck_,
|
9
|
+
input_data={},
|
10
|
+
is_time_func=lambda: True
|
11
|
+
)
|
12
|
+
ALL_SCHEDULED_OPERATIONS.append(operation_healthcheck)
|
arpakitlib/ar_fastapi_util.py
CHANGED
@@ -247,11 +247,11 @@ def create_handle_exception(
|
|
247
247
|
return handle_exception
|
248
248
|
|
249
249
|
|
250
|
-
def
|
250
|
+
def create_story_log_before_response_in_handle_exception(
|
251
251
|
*,
|
252
252
|
sqlalchemy_db: SQLAlchemyDB
|
253
253
|
) -> Callable:
|
254
|
-
def
|
254
|
+
def func(
|
255
255
|
*,
|
256
256
|
status_code: int,
|
257
257
|
error_so: ErrorSO,
|
@@ -277,7 +277,7 @@ def create_handle_exception_creating_story_log(
|
|
277
277
|
kwargs["story_log_id"] = story_log_dbm.id
|
278
278
|
return status_code, error_so, kwargs
|
279
279
|
|
280
|
-
return
|
280
|
+
return func
|
281
281
|
|
282
282
|
|
283
283
|
def add_exception_handler_to_app(*, app: FastAPI, handle_exception: Callable) -> FastAPI:
|
@@ -16,7 +16,7 @@ from sqlalchemy.orm import Session
|
|
16
16
|
from arpakitlib.ar_base_worker_util import BaseWorker
|
17
17
|
from arpakitlib.ar_datetime_util import now_utc_dt
|
18
18
|
from arpakitlib.ar_dict_util import combine_dicts
|
19
|
-
from arpakitlib.ar_sqlalchemy_model_util import OperationDBM, StoryLogDBM
|
19
|
+
from arpakitlib.ar_sqlalchemy_model_util import OperationDBM, StoryLogDBM, BaseOperationTypes
|
20
20
|
from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
|
21
21
|
|
22
22
|
_ARPAKIT_LIB_MODULE_VERSION = "3.0"
|
@@ -27,16 +27,18 @@ _logger = logging.getLogger(__name__)
|
|
27
27
|
def get_operation_for_execution(
|
28
28
|
*,
|
29
29
|
sqlalchemy_db: SQLAlchemyDB,
|
30
|
-
|
30
|
+
filter_operation_types: list[str] | str | None = None
|
31
31
|
) -> OperationDBM | None:
|
32
|
+
if isinstance(filter_operation_types, str):
|
33
|
+
filter_operation_types = [filter_operation_types]
|
32
34
|
with sqlalchemy_db.new_session() as session:
|
33
35
|
query = (
|
34
36
|
session
|
35
37
|
.query(OperationDBM)
|
36
38
|
.filter(OperationDBM.status == OperationDBM.Statuses.waiting_for_execution)
|
37
39
|
)
|
38
|
-
if
|
39
|
-
query = query.filter(OperationDBM.type
|
40
|
+
if filter_operation_types:
|
41
|
+
query = query.filter(OperationDBM.type.in_(filter_operation_types))
|
40
42
|
query = query.order_by(asc(OperationDBM.creation_dt))
|
41
43
|
operation_dbm: OperationDBM | None = query.first()
|
42
44
|
return operation_dbm
|
@@ -65,9 +67,9 @@ class BaseOperationExecutor:
|
|
65
67
|
self.sql_alchemy_db = sqlalchemy_db
|
66
68
|
|
67
69
|
def sync_execute_operation(self, operation_dbm: OperationDBM) -> OperationDBM:
|
68
|
-
if operation_dbm.type ==
|
70
|
+
if operation_dbm.type == BaseOperationTypes.healthcheck_:
|
69
71
|
self._logger.info("healthcheck")
|
70
|
-
elif operation_dbm.type ==
|
72
|
+
elif operation_dbm.type == BaseOperationTypes.raise_fake_exception_:
|
71
73
|
self._logger.info("raise_fake_exception")
|
72
74
|
raise Exception("raise_fake_exception")
|
73
75
|
return operation_dbm
|
@@ -139,9 +141,9 @@ class BaseOperationExecutor:
|
|
139
141
|
return operation_dbm
|
140
142
|
|
141
143
|
async def async_execute_operation(self, operation_dbm: OperationDBM) -> OperationDBM:
|
142
|
-
if operation_dbm.type ==
|
144
|
+
if operation_dbm.type == BaseOperationTypes.healthcheck_:
|
143
145
|
self._logger.info("healthcheck")
|
144
|
-
elif operation_dbm.type ==
|
146
|
+
elif operation_dbm.type == BaseOperationTypes.raise_fake_exception_:
|
145
147
|
self._logger.info("raise_fake_exception")
|
146
148
|
raise Exception("raise_fake_exception")
|
147
149
|
return operation_dbm
|
@@ -219,7 +221,7 @@ class ExecuteOperationWorker(BaseWorker):
|
|
219
221
|
*,
|
220
222
|
sqlalchemy_db: SQLAlchemyDB,
|
221
223
|
operation_executor: BaseOperationExecutor | None = None,
|
222
|
-
|
224
|
+
filter_operation_types: str | list[str] | None = None,
|
223
225
|
timeout_after_run=timedelta(seconds=0.1).total_seconds(),
|
224
226
|
timeout_after_err_in_run=timedelta(seconds=1).total_seconds()
|
225
227
|
):
|
@@ -230,7 +232,7 @@ class ExecuteOperationWorker(BaseWorker):
|
|
230
232
|
if operation_executor is None:
|
231
233
|
operation_executor = BaseOperationExecutor(sqlalchemy_db=sqlalchemy_db)
|
232
234
|
self.operation_executor = operation_executor
|
233
|
-
self.
|
235
|
+
self.filter_operation_types = filter_operation_types
|
234
236
|
|
235
237
|
def sync_on_startup(self):
|
236
238
|
self.sqlalchemy_db.init()
|
@@ -241,7 +243,7 @@ class ExecuteOperationWorker(BaseWorker):
|
|
241
243
|
def sync_run(self):
|
242
244
|
operation_dbm: OperationDBM | None = get_operation_for_execution(
|
243
245
|
sqlalchemy_db=self.sqlalchemy_db,
|
244
|
-
|
246
|
+
filter_operation_types=self.filter_operation_types
|
245
247
|
)
|
246
248
|
|
247
249
|
if not operation_dbm:
|
@@ -261,7 +263,7 @@ class ExecuteOperationWorker(BaseWorker):
|
|
261
263
|
async def async_run(self):
|
262
264
|
operation_dbm: OperationDBM | None = get_operation_for_execution(
|
263
265
|
sqlalchemy_db=self.sqlalchemy_db,
|
264
|
-
|
266
|
+
filter_operation_types=self.filter_operation_types
|
265
267
|
)
|
266
268
|
|
267
269
|
if not operation_dbm:
|
@@ -81,6 +81,11 @@ class StoryLogDBM(SimpleDBM):
|
|
81
81
|
)
|
82
82
|
|
83
83
|
|
84
|
+
class BaseOperationTypes(Enumeration):
|
85
|
+
healthcheck_ = "healthcheck"
|
86
|
+
raise_fake_exception_ = "raise_fake_exception"
|
87
|
+
|
88
|
+
|
84
89
|
class OperationDBM(SimpleDBM):
|
85
90
|
__tablename__ = "operation"
|
86
91
|
|
@@ -90,16 +95,12 @@ class OperationDBM(SimpleDBM):
|
|
90
95
|
executed_without_error = "executed_without_error"
|
91
96
|
executed_with_error = "executed_with_error"
|
92
97
|
|
93
|
-
class Types(Enumeration):
|
94
|
-
healthcheck_ = "healthcheck"
|
95
|
-
raise_fake_exception_ = "raise_fake_exception"
|
96
|
-
|
97
98
|
status: Mapped[str] = mapped_column(
|
98
99
|
TEXT, index=True, insert_default=Statuses.waiting_for_execution,
|
99
100
|
server_default=Statuses.waiting_for_execution, nullable=False
|
100
101
|
)
|
101
102
|
type: Mapped[str] = mapped_column(
|
102
|
-
TEXT, index=True, insert_default=
|
103
|
+
TEXT, index=True, insert_default=BaseOperationTypes.healthcheck_, nullable=False
|
103
104
|
)
|
104
105
|
execution_start_dt: Mapped[datetime | None] = mapped_column(TIMESTAMP(timezone=True), nullable=True)
|
105
106
|
execution_finish_dt: Mapped[datetime | None] = mapped_column(TIMESTAMP(timezone=True), nullable=True)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: arpakitlib
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.32
|
4
4
|
Summary: arpakitlib
|
5
5
|
Home-page: https://github.com/ARPAKIT-Company/arpakitlib
|
6
6
|
License: Apache-2.0
|
@@ -55,7 +55,40 @@ Description-Content-Type: text/markdown
|
|
55
55
|
|
56
56
|
# arpakitlib
|
57
57
|
|
58
|
-
|
58
|
+
## 🚀 Simplify Your Development Workflow
|
59
|
+
|
60
|
+
A collection of lightweight and convenient development tools by Arpakit, designed to simplify and accelerate your
|
61
|
+
workflow
|
62
|
+
|
63
|
+
---
|
64
|
+
|
65
|
+
### Supported Python version
|
66
|
+
|
67
|
+
- Python 3.12.4
|
68
|
+
|
69
|
+
---
|
70
|
+
|
71
|
+
### Installation with Poetry
|
72
|
+
|
73
|
+
```
|
74
|
+
poetry add arpakitlib
|
75
|
+
```
|
76
|
+
|
77
|
+
### Installation with pip
|
78
|
+
|
79
|
+
```
|
80
|
+
pip install arpakitlib
|
81
|
+
```
|
82
|
+
|
83
|
+
---
|
84
|
+
|
85
|
+
### Links
|
86
|
+
|
87
|
+
- https://pypi.org/project/arpakitlib/
|
88
|
+
- https://test.pypi.org/project/arpakitlib/
|
89
|
+
- https://github.com/ARPAKIT-Company/arpakitlib
|
90
|
+
|
91
|
+
---
|
59
92
|
|
60
93
|
## ❤️ Made by ARPAKIT Company ❤️
|
61
94
|
|
@@ -73,8 +73,8 @@ arpakitlib/_arpakit_project_template/src/additional_model/__init__.py,sha256=47D
|
|
73
73
|
arpakitlib/_arpakit_project_template/src/additional_model/additional_model.py,sha256=4KCOvto9Hj5eMYpvfaJChghhR9bkCvKluGGPWrTezoY,134
|
74
74
|
arpakitlib/_arpakit_project_template/src/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
75
|
arpakitlib/_arpakit_project_template/src/api/asgi.py,sha256=a5UBxOyNC8NG3E0ayhiDo3t5tPoB3WtOf2gbZJFWBAA,74
|
76
|
-
arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=
|
77
|
-
arpakitlib/_arpakit_project_template/src/api/event.py,sha256=
|
76
|
+
arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=5DQ2Ai9ANLpZwZS3MrGJBcqUtGArQOq12gf0cNtNb3k,4378
|
77
|
+
arpakitlib/_arpakit_project_template/src/api/event.py,sha256=zxPHIJyGu1QwgDXF0GQD-SIWO-jooYeHbtW-QcbT8Ks,805
|
78
78
|
arpakitlib/_arpakit_project_template/src/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
79
79
|
arpakitlib/_arpakit_project_template/src/api/router/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
80
80
|
arpakitlib/_arpakit_project_template/src/api/router/v1/main_router.py,sha256=7MnhMwhmkYlbtvhmprXJ8nfs_iOPYBluwhcef5e_EBY,64
|
@@ -87,13 +87,14 @@ arpakitlib/_arpakit_project_template/src/api/transmitted_api_data.py,sha256=YtpA
|
|
87
87
|
arpakitlib/_arpakit_project_template/src/business_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
88
88
|
arpakitlib/_arpakit_project_template/src/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
89
|
arpakitlib/_arpakit_project_template/src/core/const.py,sha256=CZZew674y7LhCAlYhvuF5cV4Zb9nQ17j2Tcuj2GEBf4,1232
|
90
|
-
arpakitlib/_arpakit_project_template/src/core/
|
91
|
-
arpakitlib/_arpakit_project_template/src/core/scheduled_operations.py,sha256=W6ALtmW8oNuX0Y03Aqfgb4WlUWKtQetRgv1P3Lp6acE,324
|
92
|
-
arpakitlib/_arpakit_project_template/src/core/settings.py,sha256=Q5qgGRtK1091STtgDL4pzzdu-LTZijKRQ0WtDt0xu9k,1459
|
90
|
+
arpakitlib/_arpakit_project_template/src/core/settings.py,sha256=CDNllVPKvP-3LabGv3CFJodKhZtQ7R_umLgQ7rr-xN4,1748
|
93
91
|
arpakitlib/_arpakit_project_template/src/core/util.py,sha256=I5Cxd-lXVMnpjMOyfoNcfOdL05xrujXBmYi5d91AjJg,1714
|
94
92
|
arpakitlib/_arpakit_project_template/src/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
95
93
|
arpakitlib/_arpakit_project_template/src/db/sqlalchemy_model.py,sha256=nXtayUkBaVb6tWx5qJgXZLbLOTVAjnSLpSDxBm7yZLc,234
|
96
94
|
arpakitlib/_arpakit_project_template/src/db/util.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
95
|
+
arpakitlib/_arpakit_project_template/src/operation_execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
|
+
arpakitlib/_arpakit_project_template/src/operation_execution/operation_executor.py,sha256=jAcBicGYq78p4LZe4G3tU1hRxIsODBRoHerhExZab4k,619
|
97
|
+
arpakitlib/_arpakit_project_template/src/operation_execution/scheduled_operations.py,sha256=1zVJ36uZdKJ_4_2XYhsZJ5T1aD_bgBz0U26SywSp8sU,362
|
97
98
|
arpakitlib/_arpakit_project_template/src/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
98
99
|
arpakitlib/_arpakit_project_template/src/test_data/make_test_data_1.py,sha256=3WVPgRsNCIxWpA-6t_Phe-nFULdHPhS1S_DO11XRmqk,80
|
99
100
|
arpakitlib/_arpakit_project_template/src/test_data/make_test_data_2.py,sha256=MVDc71sj5I1muWin50GwrSxMwYtOOSDOtRmeFErHcXs,80
|
@@ -135,7 +136,7 @@ arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css,sha256=jzPZlgJTFwSdSphk9C
|
|
135
136
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map,sha256=5wq8eXMLU6Zxb45orZPL1zAsBFJReFw6GjYqGpUX3hg,262650
|
136
137
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js,sha256=ffrLZHHEQ_g84A-ul3yWa10Kk09waOAxHcQXPuZuavg,339292
|
137
138
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map,sha256=9UhIW7MqCOZPAz1Sl1IKfZUuhWU0p-LJqrnjjJD9Xhc,1159454
|
138
|
-
arpakitlib/ar_fastapi_util.py,sha256=
|
139
|
+
arpakitlib/ar_fastapi_util.py,sha256=xZyQ2AmGmmf4lGiK4ykJxTSFZKzX-MJ9LJ92BOCARgY,24428
|
139
140
|
arpakitlib/ar_file_storage_in_dir_util.py,sha256=D3e3rGuHoI6xqAA5mVvEpVVpOWY1jyjNsjj2UhyHRbE,3674
|
140
141
|
arpakitlib/ar_file_util.py,sha256=XiwmeycxoLqtYnGOu5q6IEaJJXilZvtLvsKDKtwqSLY,137
|
141
142
|
arpakitlib/ar_hash_util.py,sha256=Iqy6KBAOLBQMFLWv676boI5sV7atT2B-fb7aCdHOmIQ,340
|
@@ -150,23 +151,23 @@ arpakitlib/ar_logging_util.py,sha256=Gyd7B9k0glIXPm6dASiigWLq9LC9lw6vhXTCeWpY5PY
|
|
150
151
|
arpakitlib/ar_mongodb_util.py,sha256=2ECkTnGAZ92qxioL-fmN6R4yZOSr3bXdXLWTzT1C3vk,4038
|
151
152
|
arpakitlib/ar_need_type_util.py,sha256=xq5bbAXJG-93CRVZUcLW0ZdM22rj-ZUW17C5hX_5grg,1699
|
152
153
|
arpakitlib/ar_openai_api_client_util.py,sha256=dHUbfg1sVVCjsNl_fra3iCMEz1bR-Hk9fE-DdYbu7Wc,1215
|
153
|
-
arpakitlib/ar_operation_execution_util.py,sha256=
|
154
|
+
arpakitlib/ar_operation_execution_util.py,sha256=QwilFhe_wm_XuDVyyFZYBXcwXNKqLQJnCY2fFhpOdYw,12535
|
154
155
|
arpakitlib/ar_parse_command.py,sha256=-s61xcATIsfw1eV_iD3xi-grsitbGzSDoAFc5V0OFy4,3447
|
155
156
|
arpakitlib/ar_postgresql_util.py,sha256=1AuLjEaa1Lg4pzn-ukCVnDi35Eg1k91APRTqZhIJAdo,945
|
156
157
|
arpakitlib/ar_run_cmd_util.py,sha256=D_rPavKMmWkQtwvZFz-Io5Ak8eSODHkcFeLPzNVC68g,1072
|
157
158
|
arpakitlib/ar_schedule_uust_api_client_util.py,sha256=JD-hRUQSs-euK0zq9w_4QUfGO00yWM08gllWUVKTtHc,6109
|
158
159
|
arpakitlib/ar_settings_util.py,sha256=95SaC8ROUoFFIZvGsOUmz4OEyn-KospL_EqjFYAJs9U,1231
|
159
160
|
arpakitlib/ar_sleep_util.py,sha256=OaLtRaJQWMkGjfj_mW1RB2P4RaSWsAIH8LUoXqsH0zM,1061
|
160
|
-
arpakitlib/ar_sqlalchemy_model_util.py,sha256=
|
161
|
+
arpakitlib/ar_sqlalchemy_model_util.py,sha256=TFGOAgpxcnBV_u7yZrLCkf1ldlB4Of8vIRsyk9kyP5c,4987
|
161
162
|
arpakitlib/ar_sqlalchemy_util.py,sha256=Hcg1THrDsSR_-8dsY1CG3NWPEv0FqCbkPXFXLtjlSJ0,4207
|
162
163
|
arpakitlib/ar_ssh_runner_util.py,sha256=jlnss4V4pziBN1rBzoK_lDiWm6nMOqGXfa6NFJSKH-Y,6796
|
163
164
|
arpakitlib/ar_str_util.py,sha256=oCEtQ_TTn35OEz9jCNLjbhopq76JmaifD_iYR-nEJJ4,2142
|
164
165
|
arpakitlib/ar_type_util.py,sha256=GNc9PgFKonj5lRlAHSnVPBN5nLIslrG8GTiZHjkf05w,2138
|
165
166
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
|
166
167
|
arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
|
167
|
-
arpakitlib-1.7.
|
168
|
-
arpakitlib-1.7.
|
169
|
-
arpakitlib-1.7.
|
170
|
-
arpakitlib-1.7.
|
171
|
-
arpakitlib-1.7.
|
172
|
-
arpakitlib-1.7.
|
168
|
+
arpakitlib-1.7.32.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
169
|
+
arpakitlib-1.7.32.dist-info/METADATA,sha256=M_gfVk9VgpW4OBn9CoyrDkjkYsro0YSgAiCXbio9ol4,2824
|
170
|
+
arpakitlib-1.7.32.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
|
171
|
+
arpakitlib-1.7.32.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
172
|
+
arpakitlib-1.7.32.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
173
|
+
arpakitlib-1.7.32.dist-info/RECORD,,
|
@@ -1,12 +0,0 @@
|
|
1
|
-
from arpakitlib.ar_operation_execution_util import ScheduledOperation
|
2
|
-
|
3
|
-
from arpakitlib.ar_sqlalchemy_model_util import OperationDBM
|
4
|
-
|
5
|
-
SCHEDULED_OPERATIONS = []
|
6
|
-
|
7
|
-
operation = ScheduledOperation(
|
8
|
-
type=OperationDBM.Types.healthcheck_,
|
9
|
-
input_data={},
|
10
|
-
is_time_func=lambda: True
|
11
|
-
)
|
12
|
-
SCHEDULED_OPERATIONS.append(operation)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|