I have to process/1
function in my worker and also have args_schema
is defined.
args_schema do
field :post_id, :uuid, required: true
field :user_id, :uuid, required: true
field :comment_id, :uuid
def process(%Job{args: %{post_id: post_id, user_id: user_id, comment_id: comment_id}}) do
# other code
%{comment_ids: ids}
|> new()
|> Oban.insert()
end
def process(%Job{args: %{comment_ids: ids}}) do
# code here.
end
I guess second process/1
function is not called and get warning about unknown field. How can I do this? Can I define another args_schema
before second process function? or this is not possible?