How is processing flow processed in haml?

I have a run.haml file where I run a test suit. Everything works fine, but I want to display the text "Launch test suite: # {params ['run']}" right after the user clicks on the link that will lead him to this hamle.

the clicked link tells haml which costume to execute

%a(href="run?run=#{file}")

At the moment, everything is displayed after the test is completed. The run.haml page loads before the script completes.

  • How haml workflow works ?
  • Is it possible to start processing a job after starting to render a page?
  • Can I display text in a browser and then by calling a test suit?

It takes several minutes to complete the test suit.


    !!!  
    %html  
      %head  
        %title Running  
      %body
        = "Starting test suite: #{params['run']}"
        - output = %x[cd C:\\Program Files\\TestPro\\TestPro Automation Framework410 && ant -lib lib -f "C:\\Program Files\\TestPro\\TestPro Automation Framework410\\Output Files\\builds\\#{params['run']}.xml"]
        -#The result is
        %br
        = output.split("\n")[-2,2].join("<BR>")
        = "<br/>"*2
        %a(href="/")back to suits list
0
1

, - , ( - ), .

, -

, () - , , , - BackgrounDRb, run_later delayed_job .

, Sinatra delayed_job.

+1

Source: https://habr.com/ru/post/1769696/


All Articles