qacloud 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/qacloud.rb +15 -7
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 430c98f57d74a8b7f28040c6726f79a445aed1be
         | 
| 4 | 
            +
              data.tar.gz: 44c97c157da4ae6e7b2c5daa39762202765f727a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 735ffb3ce90468b1f9573d32101ff936af138da21e563a25621ea55bce0fa6404fb890cc764d2c36087b3ff2980b01fe24f311ca08ed62ca1483f037790c680f
         | 
| 7 | 
            +
              data.tar.gz: a876a451c66e9fa27bb1636853a7ce3b70f803b90bb97d8d338825c54750d909f929135ae1a94a1024e213dfa098d3eb77286aa1bb34decec8339260c24f19f3
         | 
    
        data/lib/qacloud.rb
    CHANGED
    
    | @@ -44,7 +44,7 @@ $add_variable = Hash.new | |
| 44 44 | 
             
            			end
         | 
| 45 45 | 
             
            			require_relative "#{path}"
         | 
| 46 46 | 
             
            			dur1 = Time.now
         | 
| 47 | 
            -
            			 | 
| 47 | 
            +
            			send($task_name)
         | 
| 48 48 |  | 
| 49 49 | 
             
            	rescue Exception => e
         | 
| 50 50 |  | 
| @@ -56,7 +56,11 @@ $add_variable = Hash.new | |
| 56 56 | 
             
            		dur2 = Time.now
         | 
| 57 57 | 
             
            		status = "fail"
         | 
| 58 58 | 
             
            		result = "Exception occured, Checkpoint should have more info."
         | 
| 59 | 
            +
            		if ($checkpoint.nil?) == true then
         | 
| 59 60 | 
             
            		checkpoint = "Error Message: #{@error_message} , Script Line Number: #{@error_line}"
         | 
| 61 | 
            +
            		else
         | 
| 62 | 
            +
            		checkpoint = $checkpoint
         | 
| 63 | 
            +
            		end	
         | 
| 60 64 | 
             
            		duration = dur2 - dur1
         | 
| 61 65 | 
             
            		# taskhash = Qacloud.GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
         | 
| 62 66 | 
             
            		# $workflow_status = "finished"
         | 
| @@ -72,7 +76,7 @@ $add_variable = Hash.new | |
| 72 76 | 
             
            	end
         | 
| 73 77 |  | 
| 74 78 | 
             
            	while $workflow_status !=  "finished"
         | 
| 75 | 
            -
            		    taskhash = Qacloud.GetNextTask( | 
| 79 | 
            +
            		    taskhash = Qacloud.GetNextTask(playlistID,tokenID,status,result,checkpoint,duration)
         | 
| 76 80 | 
             
            			$workflow_name =  taskhash["body"]["workflow_name"]
         | 
| 77 81 | 
             
            			$workflow_id =  taskhash["body"]["workflow_id"]
         | 
| 78 82 | 
             
            			$task_name =  taskhash["body"]["task_name"]
         | 
| @@ -82,10 +86,10 @@ $add_variable = Hash.new | |
| 82 86 | 
             
            			$workflow_status = taskhash["body"]["test"]
         | 
| 83 87 |  | 
| 84 88 | 
             
            	break if $workflow_status == "finished"
         | 
| 85 | 
            -
            				if $add_variable.empty? == true then
         | 
| 86 | 
            -
            				else
         | 
| 87 | 
            -
            				$get_variable.merge!($add_variable)
         | 
| 88 | 
            -
            				end	
         | 
| 89 | 
            +
            				# if $add_variable.empty? == true then
         | 
| 90 | 
            +
            				# else
         | 
| 91 | 
            +
            				# $get_variable.merge!($add_variable)
         | 
| 92 | 
            +
            				# end	
         | 
| 89 93 | 
             
            				puts "Workflow: #{$workflow_name}"
         | 
| 90 94 | 
             
            				puts "Now Starting Task: #{$task_name}"
         | 
| 91 95 | 
             
            	begin
         | 
| @@ -98,7 +102,7 @@ $add_variable = Hash.new | |
| 98 102 | 
             
            			end
         | 
| 99 103 | 
             
            				require_relative "#{path}"
         | 
| 100 104 | 
             
            				dur1 = Time.now
         | 
| 101 | 
            -
            				 | 
| 105 | 
            +
            				send($task_name)
         | 
| 102 106 |  | 
| 103 107 | 
             
            	rescue Exception => e
         | 
| 104 108 | 
             
            			puts "Exception occured, Checkpoint should have more info."
         | 
| @@ -109,7 +113,11 @@ $add_variable = Hash.new | |
| 109 113 | 
             
            			dur2 = Time.now
         | 
| 110 114 | 
             
            			status = "fail"
         | 
| 111 115 | 
             
            			result = "Exception occured, Checkpoint should have more info."
         | 
| 116 | 
            +
            			if ($checkpoint.nil?) == true then
         | 
| 112 117 | 
             
            			checkpoint = "Error Message: #{@error_message} , Script Line Number: #{@error_line}"
         | 
| 118 | 
            +
            			else
         | 
| 119 | 
            +
            			checkpoint = $checkpoint
         | 
| 120 | 
            +
            			end	
         | 
| 113 121 | 
             
            			duration = dur2 - dur1
         | 
| 114 122 | 
             
            			# taskhash = Qacloud.GetNextTask(task_id,tokenID,status,result,checkpoint,duration)
         | 
| 115 123 | 
             
            			# $workflow_status = "finished"
         |