Announcement

Collapse
No announcement yet.

MvASYNCHRONOUS -- Does anyone have an example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Yeah 120 seconds is a long time. Are you processing the data at all within your MvASYNC tag? Or is that code all that it is doing?
    David Carver
    Miva, Inc. | Software Developer

    Comment


      #17
      I'm not currently. I guess I wanted some clarification on that too. So I can plan to do that.

      I am trying to get access to view the Empressa config to find out if there is a limitation to Async. The code I posted, was an initial test to find out if it would run at all. Does that code look like it should run if the config will allow any Async tasks?

      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #18
        Yes that code seems fine. A better way to handle all of this may be to have your module implement the scheduledtask feature, create X task, and on task execution it could do your MvCALL for you. This way you can have logging for the task being run and any errors that may happen while running it.
        David Carver
        Miva, Inc. | Software Developer

        Comment


          #19
          Well, turns out the Miva config has the Async Task value at -1. Is that normal for a mivatest.com dev store?

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment


            #20
            David, Thanks.

            Looks like I have my Async function working.

            For posterity: on this dev store I needed to change the task setting to 0 (zero). Empress doesn't need a restart.

            Two question regarding Async.

            1) Within the tag, looks like MvEval doesn't render the screen? The only way to debug/test results is file output?

            2) And for clarification, Wondering if scheduled tasks are wrapped in an Async? The documentation does mention you can't start an Async within an Async. How does this affect a scheduled task? If my task execution function has an Async, will it run?

            Scott
            Last edited by ids; 03-30-23, 10:11 AM.
            Need to offer Shipping Insurance?
            Interactive Design Solutions https://www.myids.net
            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
            Competitive Rates, Custom Modules and Integrations, Store Integration
            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
            My T-shirt Collection is mostly MivaCon T-shirts!!

            Comment


              #21
              Correct no data can be output from within an MvASYNC task. And yes, scheduled tasks are wrapped in an MvASYNC tag. Since that is the case, you just wouldn't call MvASYNC from your helper function.
              David Carver
              Miva, Inc. | Software Developer

              Comment


                #22
                Originally posted by Scot - ScotsScripts.com View Post
                I use mvasync for anything that might time out since the async process is, from what I've been told, a roughly 60 minute process done in the background. If I need to show progress I create a flat file that has whatever progress data I want and check for it if the user triggers a progress display. Important to know that mvasync won't work with store functions or anything like that unless you initialize the store environment, similar to how you'd need to init the store environment for mvprocessupload.
                Is the Blogger module using mvasync in this manner? Possibly on every runtime request? We've found a store that is having significant performance issues as a result of what appears to be that module and async tasks when there are concurrent requests.
                David Hubbard
                CIO
                Miva
                [email protected]
                http://www.miva.com

                Comment


                  #23
                  No, I just searched the code, nothing in the blog module is using mvasync. However, the ganalytics4.mvc module does and it makes a couple calls to to the blog module (if available) to load post or category meta data for blog article tracking.

                  I would check to see what version of the ganalytics4 module they are running (if any) and make sure it's up to date. The current public release is 1.016

                  https://www.scotsscripts.com/updates...ics4.1.016.zip

                  There was an issue with an early version of the ganaltyics4 module that caused performance issues, but not because of mvasync, it had more to do with a bunch of processor consuming category/product lookups or something.

                  Also from what I understand there is a bug with mvasync, not sure if it's been fixed yet and I can not remember the details but it can and does cause performance issues through normal mvasync usage.
                  M.A.D.* since 1997

                  http://www.scotsscripts.com

                  *miva application developers

                  Comment

                  Working...
                  X