型号名称:Class Shopify
embeded_one:shopify
webhooks jobs类名:class Shopify
我正在使用shopify app gem来构建一个shopify一个插件。另外,我使用rails 5.1和mongoid 7.0
class Shopify::Webhooks::ProductsUpdateJob < ApplicationJob
queue_as :default
def perform(*args)
# Do something later
puts("Product Updated Job called...!!")
user = User.find_by({"shopify.domain": domain})
# perform weebhooks
问题是我的其他Shopify应用程序具有相同的项目结构,但它在生产中成功运行和构建。
在定义Shopify::Webhooks::ProductsUpdateJob
之前,似乎正在评估Shopify
。
试试这个:
module Shopify
module Webhooks
class ProductsUpdateJob < ApplicationJob
...
end
end
end
(另外,我不建议在顶层命名自己的模块Shopify
,作为第三方平台。)