Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task Runner Shipping Rates Cache #262

Closed
walmat opened this issue Jan 20, 2019 · 2 comments
Closed

Task Runner Shipping Rates Cache #262

walmat opened this issue Jan 20, 2019 · 2 comments
Labels
area:task-runner Related to Nebula's Task Runner package priority:low Issues that are low priority don't need to be solved right away type:enhancement New feature or request type:Feature Request Something that might be done in the future

Comments

@walmat
Copy link
Owner

walmat commented Jan 20, 2019

Is your feature request related to a problem? Please describe.
When a user starts a task, we can be under the assumption that the product isn't live yet, right? Therefore, our current Task Runner will go through the steps:

for api:

  1. start
  2. login (if needed)
  3. payment token
  4. create checkout
  5. patch checkout
  6. monitor

for frontend:

  1. start
  2. payment token
  3. monitor

Here we will hang until the product is live.

This means, until the product goes live, we don't have:
1. payment gateway No longer needed
2. shipping rates

Describe the solution you'd like
I'm proposing a concurrent runner that gets started with the current runner that will go through certain steps in order to also find the payment gateway and shipping rates.

Here's what I'm thinking.. We start both the normal task runner, and the pre-carting one at the same time, except.. The pre-carting task runner will go through the steps:

for api:

  1. start
  2. create checkout
  3. find random item (if no items, exit early)
  4. add to cart (if oos, try other variant, or loop back to Tracking list of valid license keys after purchasing the software #3 to find a different product)
  5. shipping rates (if no rates, exit early)
  6. clear cart (find out if this is needed)

for frontend:
this isn't possible (at least for sites like DSM with a password page)

At the point it reaches payment gateway and finishes, it should transfer:

  1. shipping rates

back to the main task runner session to be used later. That way, as soon as we find the item, we can complete the checkout a lot faster with less requests. And since the main task runner is still using the old checkout token, we won't need to clear the cart or anything (I think?) but that's something we can look into.

Describe alternatives you've considered
None.

Additional context
This will be a feature that will put us ahead of other bots a ton. I know 1 of the other major bots does this, but not many others.

Edit: see 1st comment for updated idea.

@walmat walmat added type:enhancement New feature or request type:Feature Request Something that might be done in the future area:task-runner Related to Nebula's Task Runner package labels Jan 20, 2019
@walmat walmat added this to the Beta 4 Release milestone Jan 20, 2019
@walmat walmat removed this from the Beta 4 Release milestone Feb 1, 2019
@pr1sm pr1sm added the priority:low Issues that are low priority don't need to be solved right away label Feb 11, 2019
@walmat walmat changed the title Concurrent Task Runner SubSystem – PreCarting Task Runner Cache Feb 26, 2019
@walmat walmat changed the title Task Runner Cache Task Runner Shipping Rates Cache Feb 26, 2019
@walmat
Copy link
Owner Author

walmat commented Feb 26, 2019

Instead of the initial OP, I've went ahead and rethought my approach to this and think it would be better (and easier on our end) if we had a way to store shipping rates for the user that has been previously fetched for a site & profile. That way, we can eliminate the need for the call to fetch shipping rates and proceed to post payment immediately after ATC. This will probably have some sort of requirement from #361 I'm guessing.

I'll update the title and make a note in the OP as well. Let me know what you think @pr1sm.

@walmat
Copy link
Owner Author

walmat commented Apr 6, 2019

Whoops.. Looks like this got left open after #402. Closing...

@walmat walmat closed this as completed Apr 6, 2019
@pr1sm pr1sm added this to the Beta 7 Release milestone Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:task-runner Related to Nebula's Task Runner package priority:low Issues that are low priority don't need to be solved right away type:enhancement New feature or request type:Feature Request Something that might be done in the future
Projects
None yet
Development

No branches or pull requests

2 participants