Hello community,

here is the log from the commit of package webyast-base-ws for openSUSE:Factory
checked in at Thu May 19 13:01:57 CEST 2011.



--------
--- webyast-base-ws/webyast-base-ws.changes     2011-05-03 10:57:10.000000000 
+0200
+++ /mounts/work_src_done/STABLE/webyast-base-ws/webyast-base-ws.changes        
2011-05-19 10:17:55.000000000 +0200
@@ -1,0 +2,35 @@
+Thu May 19 08:09:54 UTC 2011 - sch...@novell.com
+
+- init_cache has the controller name as an argument. This is needed
+  for (bnc#693928)
+- 0.2.21 
+
+-------------------------------------------------------------------
+Wed May 18 11:32:01 UTC 2011 - sch...@novell.com
+
+- reduced loglevel of nginx (bnc#694495)
+- 0.2.20 
+
+-------------------------------------------------------------------
+Mon May 16 10:58:04 UTC 2011 - sch...@novell.com
+
+- changed licence to the correct name LGPL-2.0 
+- 0.2.19
+
+-------------------------------------------------------------------
+Tue May 10 10:33:12 UTC 2011 - sch...@novell.com
+
+- 0.2.18
+
+-------------------------------------------------------------------
+Fri May  6 14:29:28 UTC 2011 - sch...@novell.com
+
+- call for evaluating running jobs 
+
+-------------------------------------------------------------------
+Tue May  3 14:55:32 UTC 2011 - sch...@novell.com
+
+- fixes in argument list of cache handling
+- 0.2.17 
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ webyast-base-ws.spec ++++++
--- /var/tmp/diff_new_pack.7UD3jP/_old  2011-05-19 12:58:19.000000000 +0200
+++ /var/tmp/diff_new_pack.7UD3jP/_new  2011-05-19 12:58:19.000000000 +0200
@@ -55,11 +55,11 @@
 PreReq:         rubygem-rails-2_3 >= 2.3.8
 PreReq:         rubygem-rpam, rubygem-polkit, rubygem-gettext_rails
 PreReq:         yast2-runlevel
-License:        LGPLv2.1
+License:        LGPL-2.0
 Group:          Productivity/Networking/Web/Utilities
 Url:            http://en.opensuse.org/Portal:WebYaST
 AutoReqProv:    on
-Version:        0.2.16
+Version:        0.2.21
 Release:        1
 Summary:        WebYaST - base components for rest service
 Source:         www.tar.bz2
@@ -111,7 +111,7 @@
 BuildArch:      noarch
 
 %package testsuite
-License:        LGPLv2.1
+
 Group:          Productivity/Networking/Web/Utilities
 Requires:       webyast-base-ws = %{version}
 Summary:        Testsuite for webyast-base-ws package

++++++ nginx.conf ++++++
--- /var/tmp/diff_new_pack.7UD3jP/_old  2011-05-19 12:58:19.000000000 +0200
+++ /var/tmp/diff_new_pack.7UD3jP/_new  2011-05-19 12:58:19.000000000 +0200
@@ -36,7 +36,7 @@
     default_type  application/octet-stream;
 
     access_log  /srv/www/yastws/log/access.log;
-    passenger_log_level 3;
+    passenger_log_level 0;
     passenger_debug_log_file /srv/www/yastws/log/passenger.log;
 
     sendfile        on;


++++++ www.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/www/app/controllers/application_controller.rb 
new/www/app/controllers/application_controller.rb
--- old/www/app/controllers/application_controller.rb   2011-05-03 
09:22:51.000000000 +0200
+++ new/www/app/controllers/application_controller.rb   2011-05-19 
08:51:56.000000000 +0200
@@ -73,7 +73,7 @@
 
   private
 
-  def init_cache
+  def init_cache(controller_name = request.parameters["controller"])
     return unless (logged_in? && YastCache.active) #Does not make sense if no 
session id is available or
                                                    #cache is not active
     if request && request.request_method == :get
@@ -81,7 +81,7 @@
                      request.parameters["action"] == "index")
       #finding the correct cache name 
       #(has to be the model class name and not the controller name)
-      path = YastCache.find_key(request.parameters["controller"], 
(request.parameters["id"] || :all))
+      path = YastCache.find_key(controller_name, (request.parameters["id"] || 
:all))
       if path.blank?
         logger.info("Cache for model #{path} not found")
         return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/www/app/models/data_cache.rb 
new/www/app/models/data_cache.rb
--- old/www/app/models/data_cache.rb    2011-04-12 14:52:31.000000000 +0200
+++ new/www/app/models/data_cache.rb    2011-05-03 14:08:25.000000000 +0200
@@ -28,9 +28,7 @@
   def DataCache.extract_path_args(path)
     path_array = path.split(":")
     ret_array = path_array[0,2]
-    if path_array.size >= 4 && path_array[3] == "all"
-      ret_array << ":all"
-    elsif path_array.size >= 3
+    if path_array.size >= 3
       ret_array << path_array[2]
     end
     ret_array.join(":")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/www/app/models/resource.rb 
new/www/app/models/resource.rb
--- old/www/app/models/resource.rb      2011-05-02 12:33:04.000000000 +0200
+++ new/www/app/models/resource.rb      2011-05-03 14:59:07.000000000 +0200
@@ -38,7 +38,7 @@
 
   def self.find(what)
     # There is no reload mechansim for the cache. So fetch it directly
-    return Rails.cache.fetch("resource:find:#{what.inspect}") {
+    return Rails.cache.fetch("resource:find:#{what}") {
       case what
         when :all then
           resources = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/www/lib/plugin_job.rb new/www/lib/plugin_job.rb
--- old/www/lib/plugin_job.rb   2011-04-29 18:23:25.000000000 +0200
+++ new/www/lib/plugin_job.rb   2011-05-06 15:52:03.000000000 +0200
@@ -38,25 +38,35 @@
       Delayed::Job.enqueue(PluginJob.new(object,method,args),prio)
     end
 
-    # Checks if job is running
+    # Counts the jobs which are running
     # @param[Object,String,Symbol] object on which job should run
     # @param[Symbol,nil] method called method or all method if nil passed
     # @param[Array] args list of all parameters or empty array which match any 
arguments
-    def running? (object, method = nil, *args)
+    def running (object, method = nil, *args)
+      count = 0
       jobs = Delayed::Job.all
       jobs.any? do |job|
         data = YAML.load job.handler
         if !args.empty? #all args
-          object == data[:class_name] &&
-              method == data[:method] &&
-              args == data[:arguments]
+          count += 1 if object == data[:class_name] &&
+                        method == data[:method] &&
+                        args == data[:arguments]
         elsif method
-          object == data[:class_name] &&
-              method == data[:method]
+          count += 1 if object == data[:class_name] &&
+                        method == data[:method]
         else
-          object == data[:class_name]
+          count += 1 if object == data[:class_name]
         end
       end
+      count
+    end
+
+    # Checks if job is running
+    # @param[Object,String,Symbol] object on which job should run
+    # @param[Symbol,nil] method called method or all method if nil passed
+    # @param[Array] args list of all parameters or empty array which match any 
arguments
+    def running? (object, method = nil, *args)
+      PluginJob.running (object, method, *args) > 0 ? true : false
     end
   end
 
@@ -76,7 +86,7 @@
     if object.class != NameError && object.respond_to?(function_method)
       Rails.logger.info "Calling job: #{object}:#{function_method}"
       Rails.logger.info "             args: #{function_args.inspect}" unless 
function_args.blank?
-      call_identifier = YastCache.key(object,function_method,function_args)
+      call_identifier = YastCache.key(object,function_method,*function_args)
       Rails.cache.delete(call_identifier) #cache reset. This dedicates that
                                           #the values has been re-read
       ret = object.send(function_method, *function_args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/www/lib/yast_cache.rb new/www/lib/yast_cache.rb
--- old/www/lib/yast_cache.rb   2011-05-03 09:21:56.000000000 +0200
+++ new/www/lib/yast_cache.rb   2011-05-03 16:23:59.000000000 +0200
@@ -39,7 +39,7 @@
 
   def YastCache.key(model, method, *args)
     unless args.empty?
-      return "#{model.to_s.downcase}:#{method.to_s.downcase}:#{args}"
+      return "#{model.to_s.downcase}:#{method.to_s.downcase}:#{args.join(":")}"
     else
       return "#{model.to_s.downcase}:#{method.to_s.downcase}"
     end        
@@ -89,7 +89,7 @@
       #reset also find.all caches
       YastCache.reset_and_restart(calling_object, delay, delete_cache, :all)
     end
-    key = YastCache.key(model, :find, arguments)
+    key = YastCache.key(model, :find, *arguments)
     Rails.cache.delete(key) if delete_cache
     jobs = Delayed::Job.find(:all)
     start_job = true
@@ -128,7 +128,7 @@
 #      Rails.logger.debug "YastCache.delete: Cache is not active"
       return
     end
-    cache_key = YastCache.key(model_symbol(calling_object), :find, arguments)
+    cache_key = YastCache.key(model_symbol(calling_object), :find, *arguments)
     Rails.cache.delete(cache_key)
 
     #finding involved keys e.g. user:find:<id> includes user:find::all
@@ -146,7 +146,7 @@
         return nil
       end
     end
-    key = YastCache.key(model_symbol(calling_object), :find, options)
+    key = YastCache.key(model_symbol(calling_object), :find, *options)
     job_delay = 3
     raised_exception = nil
     re_load = Rails.cache.exist?(key) ?  true : false


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to