lib/rbmk/worker.rb in rbmk-0.1.0.e vs lib/rbmk/worker.rb in rbmk-0.1.0.f

- old
+ new

@@ -4,23 +4,31 @@ class Worker def self.hire peer, upstream; new(peer, upstream).serve end def initialize peer, upstream - upstream.mktemp + @upstream = upstream + @upstream.mktemp @peer = peer @conn = LDAP::Server::Connection.new @peer.socket, - server: upstream, + server: @upstream, logger: $log, operation_class: RBMK::Operation, - schema: upstream.schema, - namingContexts: upstream.root_dse['namingContexts'] + operation_args: [self], + schema: @upstream.schema, + namingContexts: @upstream.root_dse['namingContexts'] + user_init end def serve @conn.handle_requests ensure @peer.close end + +protected + + # Patch this method to implement your additional worker init actions + def user_init; end end end