from rake task gives 404

Shopify Partner
4 0 1

I'm trying to create a new fulfillment from a background job called from a rake task.

First I create the session and activate it in the background job

session = shop.shopify_domain, token: shop.shopify_token, api_version: "2020-07")

Then I make the call

f =
	:order_id => stored_order.shopify_id,
	:location_id => 47171928231
f.prefix_options = { :order_id => stored_order.shopify_id }


When I call the background job from a controller that is authenticated, it works perfectly.

When I run this from a rake task I get a 404

ActiveResource::ResourceNotFound (Failed.  Response code = 404.  Response message = Not Found (Not Found).)


I'm not sure where the issue is with the rake task or why I'm getting a different result.  I get that the controller is authenticated, but I thought activating the session for the job was the answer to that.  When I puts out the session it shows up in the console.

What am I missing here?

Looking to customize your theme? Don't hire a developer - instead check out Design Packs!
Replies 0 (0)