Skip to content

Commit 4261aff

Browse files
committed
♻️ clean: remove unuse config.
1 parent 30babbe commit 4261aff

5 files changed

Lines changed: 63 additions & 64 deletions

File tree

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,17 @@ class RestAuth(BaseModel):
189189

190190
@tag("requests", alias="get-api-with-oauth-to-s3")
191191
def get_api_with_oauth_to_s3(
192-
method: str,
193-
url: str,
194-
body: dict[str, str],
195-
auth: RestAuth,
196-
writing_node: str,
197-
aws: AwsCredential,
198-
result: Result,
192+
method: str,
193+
url: str,
194+
body: dict[str, str],
195+
auth: RestAuth,
196+
writing_node: str,
197+
aws: AwsCredential,
198+
result: Result,
199199
) -> dict[str, int]:
200+
"""Get the data from RestAPI via Authenticate with OAuth and then store to
201+
AWS S3 service.
202+
"""
200203
result.trace.info("[CALLER]: Start get data via RestAPI to S3.")
201204
result.trace.info(f"... {method}: {url}")
202205
if method != "post":
@@ -228,23 +231,22 @@ it will use default value and do not raise any error to you.
228231
> The config value that you will set on the environment should combine with
229232
> prefix, component, and name which is `WORKFLOW_{component}_{name}` (Upper case).
230233
231-
| Name | Component | Default | Description |
232-
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
233-
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
234-
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
235-
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
236-
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
237-
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
238-
| **MAX_QUEUE_COMPLETE_HIST** | CORE | `16` | |
239-
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
240-
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
241-
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | |
242-
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | |
243-
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | |
244-
| **TRACE_PATH** | LOG | `./logs` | The log path of the workflow saving log. |
245-
| **TRACE_ENABLE_WRITE** | LOG | `false` | |
246-
| **AUDIT_PATH** | LOG | `./audits` | |
247-
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable logging object saving log to its destination. |
234+
| Name | Component | Default | Description |
235+
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
236+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
237+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
238+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
239+
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
240+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
241+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
242+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
243+
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | A trace message console format. |
244+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
245+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
246+
| **TRACE_PATH** | LOG | `./logs` | A pointer of trace log that use to store. |
247+
| **TRACE_ENABLE_WRITE** | LOG | `false` | A flag that enable writing trace log. |
248+
| **AUDIT_PATH** | LOG | `./audits` | A pointer of audit log that use to store. |
249+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
248250

249251
## :rocket: Deployment
250252

docs/configuration.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ The main configuration that use to dynamic changing with your objective of this
1414
application. If any configuration values do not set yet, it will use default value
1515
and do not raise any error to you.
1616

17-
| Name | Component | Default | Description |
18-
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
19-
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
20-
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
21-
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
22-
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
23-
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
24-
| **MAX_QUEUE_COMPLETE_HIST** | CORE | `16` | |
25-
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
26-
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
27-
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | |
28-
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | |
29-
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | |
30-
| **TRACE_PATH** | LOG | `./logs` | The log path of the workflow saving log. |
31-
| **TRACE_ENABLE_WRITE** | LOG | `false` | |
32-
| **AUDIT_PATH** | LOG | `./audits` | |
33-
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable logging object saving log to its destination. |
17+
| Name | Component | Default | Description |
18+
|:-----------------------------|:---------:|:--------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
19+
| **REGISTRY_CALLER** | CORE | `.` | List of importable string for the call stage. |
20+
| **REGISTRY_FILTER** | CORE | `ddeutil.workflow.templates` | List of importable string for the filter template. |
21+
| **CONF_PATH** | CORE | `./conf` | The config path that keep all template `.yaml` files. |
22+
| **TIMEZONE** | CORE | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
23+
| **STAGE_DEFAULT_ID** | CORE | `false` | A flag that enable default stage ID that use for catch an execution output. |
24+
| **GENERATE_ID_SIMPLE_MODE** | CORE | `true` | A flog that enable generating ID with `md5` algorithm. |
25+
| **DEBUG_MODE** | LOG | `true` | A flag that enable logging with debug level mode. |
26+
| **FORMAT** | LOG | `%(asctime)s.%(msecs)03d (%(name)-10s, %(process)-5d,%(thread)-5d) [%(levelname)-7s] %(message)-120s (%(filename)s:%(lineno)s)` | A trace message console format. |
27+
| **FORMAT_FILE** | LOG | `{datetime} ({process:5d}, {thread:5d}) {message:120s} ({filename}:{lineno})` | A trace message format that use to write to target pointer. |
28+
| **DATETIME_FORMAT** | LOG | `%Y-%m-%d %H:%M:%S` | A datetime format of the trace log. |
29+
| **TRACE_PATH** | LOG | `./logs` | A pointer of trace log that use to store. |
30+
| **TRACE_ENABLE_WRITE** | LOG | `false` | A flag that enable writing trace log. |
31+
| **AUDIT_PATH** | LOG | `./audits` | A pointer of audit log that use to store. |
32+
| **AUDIT_ENABLE_WRITE** | LOG | `true` | A flag that enable writing audit log after end execution in the workflow release step. |
3433

3534
## Execution Override
3635

0 commit comments

Comments
 (0)