blob: 2e3c1012b1c3cdcb424af1e4fa895e83a9430cfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
class ImportService
attr_reader :referential
def initialize( referential )
@referential = referential
end
# Find an import whith his id
def find(id)
Import.new( Ievkit.scheduled_job(referential.slug, id, { :action => "importer" }) )
end
# Find all imports
def all
[].tap do |jobs|
Ievkit.jobs(referential.slug, { :action => "importer" }).each do |job|
jobs << Import.new( job )
end
end
end
end
|