#778: remove unnecessary code
This commit is contained in:
parent
8e63d78f77
commit
0fec0fb184
|
@ -5,8 +5,6 @@ module AbfWorker
|
||||||
def self.perform(options)
|
def self.perform(options)
|
||||||
id, action = options['id'], options['action']
|
id, action = options['id'], options['action']
|
||||||
case options['type']
|
case options['type']
|
||||||
when 'platform'
|
|
||||||
@runner = AbfWorker::Runners::Platform.new id, action
|
|
||||||
when 'repository'
|
when 'repository'
|
||||||
@runner = AbfWorker::Runners::Repository.new id, action
|
@runner = AbfWorker::Runners::Repository.new id, action
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
module AbfWorker
|
|
||||||
module Runners
|
|
||||||
class Platform < AbfWorker::Runners::Base
|
|
||||||
|
|
||||||
# @param [String] id The id of platform
|
|
||||||
def initialize(id, action)
|
|
||||||
super action
|
|
||||||
@platform = ::Platform.find id
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def create
|
|
||||||
platform_path = @platform.path
|
|
||||||
mk_dir(platform_path)
|
|
||||||
['/projects', '/repository'].each{ |f| mk_dir(platform_path + f) }
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
system("rm -rf #{@platform.path}")
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue