在我的应用程序中,我对 cron 作业调度程序有以下配置
config :my_app, MyApp.Scheduler,
jobs: [
{"* * * * *", {MyApp.Core, :routine, []}}
]
我正在使用符合库来设置发布配置
然后我运行mix conform.new
生成config/my_app.schema.exs
看起来像这样
[
extends: [],
import: [],
mappings: [
"my_app.Elixir.MyApp.Scheduler.jobs": [
commented: false,
datatype: [
list: {:binary, {:atom, :atom, :binary}}
],
default: [
{"* * * * *", {MyApp.Core, :routine, []}}
],
doc: "Provide documentation here.",
hidden: false,
to: "my_app.Elixir.MyApp.Scheduler.jobs"
]
],
transforms: [],
validators: []
]
然后在此之后,上面的文件用于使用.conf
此命令生成文件mix conform.configure
并生成my_app.dev.conf
文件但出现以下错误
Unable to stringify my_app.Elixir.MyApp.Scheduler.jobs, unrecognized type {:binary, {:atom, :atom, :binary}}
该.conf
文件也看起来像这样,具有空值
# Provide documentation for my_app.Elixir.MyApp.Scheduler.jobs here.
my_app.Elixir.MyApp.Scheduler.jobs =
需要转换什么才能使上述配置起作用。