it's not working
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import assets
|
import assets
|
||||||
import yaml
|
|
||||||
from dagster_docker import docker_executor
|
|
||||||
from dagster_polars import PolarsParquetIOManager
|
from dagster_polars import PolarsParquetIOManager
|
||||||
from icecream import install
|
from icecream import install
|
||||||
from jobs import check_partitions_job, deals_job
|
from jobs import check_partitions_job, deals_job
|
||||||
@@ -32,33 +29,6 @@ def deep_merge_dicts(base: dict, override: dict) -> dict:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
path = Path("dagster.yaml")
|
|
||||||
if path.exists():
|
|
||||||
with path.open() as fp:
|
|
||||||
tmp = yaml.safe_load(fp)
|
|
||||||
print(tmp)
|
|
||||||
else:
|
|
||||||
tmp = {}
|
|
||||||
|
|
||||||
tmp = tmp.get("run_launcher", {}).get("config", {})
|
|
||||||
res = deep_merge_dicts(
|
|
||||||
tmp,
|
|
||||||
{
|
|
||||||
"container_kwargs": {
|
|
||||||
"volumes": [
|
|
||||||
"/opt/dagster/shared/:/shared/:ro",
|
|
||||||
"/opt/dagster/apps/:/apps:ro",
|
|
||||||
"/opt/dagster/storage/:/storage/:rw",
|
|
||||||
"/opt/dagster/logs/:/logs:rw",
|
|
||||||
"/opt/dagster/cache/:/cache:rw",
|
|
||||||
"/tmp/something:/something:rw",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
print(res)
|
|
||||||
|
|
||||||
definitions = dg.Definitions(
|
definitions = dg.Definitions(
|
||||||
assets=[
|
assets=[
|
||||||
asset.with_attributes(
|
asset.with_attributes(
|
||||||
@@ -82,5 +52,4 @@ definitions = dg.Definitions(
|
|||||||
},
|
},
|
||||||
jobs=[deals_job, check_partitions_job],
|
jobs=[deals_job, check_partitions_job],
|
||||||
schedules=[deals_schedule],
|
schedules=[deals_schedule],
|
||||||
executor=docker_executor.configured(res),
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user