Class: Qyu::Store::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/qyu/store/base.rb

Overview

Qyu::Store::Base

Direct Known Subclasses

Memory::Adapter

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.valid_config?(_config) ⇒ Boolean

This class acts as an interface for any store implemented for Qyu Implement the following methods in any store and it should work seemlessly


9
10
11
# File 'lib/qyu/store/base.rb', line 9

def self.valid_config?(_config)
  fail Qyu::Errors::NotImplementedError
end

Instance Method Details

#clear_completed_jobsObject


59
60
61
# File 'lib/qyu/store/base.rb', line 59

def clear_completed_jobs
  fail Qyu::Errors::NotImplementedError
end

#count_jobsObject


51
52
53
# File 'lib/qyu/store/base.rb', line 51

def count_jobs
  fail Qyu::Errors::NotImplementedError
end

#delete_job(_id) ⇒ Object


55
56
57
# File 'lib/qyu/store/base.rb', line 55

def delete_job(_id)
  fail Qyu::Errors::NotImplementedError
end

#delete_workflow(_id) ⇒ Object


30
31
32
# File 'lib/qyu/store/base.rb', line 30

def delete_workflow(_id)
  fail Qyu::Errors::NotImplementedError
end

#delete_workflow_by_name(name) ⇒ Object


34
35
36
# File 'lib/qyu/store/base.rb', line 34

def delete_workflow_by_name(name)
  fail Qyu::Errors::NotImplementedError
end

#find_job(_id) ⇒ Object


43
44
45
# File 'lib/qyu/store/base.rb', line 43

def find_job(_id)
  fail Qyu::Errors::NotImplementedError
end

#find_or_persist_task(_name, _payload, _job_id, _parent_task_id) ⇒ Object

Task


65
66
67
# File 'lib/qyu/store/base.rb', line 65

def find_or_persist_task(_name, _payload, _job_id, _parent_task_id)
  fail Qyu::Errors::NotImplementedError
end

#find_task(_id) ⇒ Object


69
70
71
# File 'lib/qyu/store/base.rb', line 69

def find_task(_id)
  fail Qyu::Errors::NotImplementedError
end

#find_task_ids_by_job_id_and_name(_job_id, _name) ⇒ Object


73
74
75
# File 'lib/qyu/store/base.rb', line 73

def find_task_ids_by_job_id_and_name(_job_id, _name)
  fail Qyu::Errors::NotImplementedError
end

#find_task_ids_by_job_id_name_and_parent_task_ids(_job_id, _name, _parent_task_ids) ⇒ Object


77
78
79
# File 'lib/qyu/store/base.rb', line 77

def find_task_ids_by_job_id_name_and_parent_task_ids(_job_id, _name, _parent_task_ids)
  fail Qyu::Errors::NotImplementedError
end

#find_workflow(_id) ⇒ Object


22
23
24
# File 'lib/qyu/store/base.rb', line 22

def find_workflow(_id)
  fail Qyu::Errors::NotImplementedError
end

#find_workflow_by_name(_name) ⇒ Object


26
27
28
# File 'lib/qyu/store/base.rb', line 26

def find_workflow_by_name(_name)
  fail Qyu::Errors::NotImplementedError
end

#lock_task!(_id, _lease_time) ⇒ Object


81
82
83
# File 'lib/qyu/store/base.rb', line 81

def lock_task!(_id, _lease_time)
  fail Qyu::Errors::NotImplementedError
end

#persist_job(_workflow, _payload) ⇒ Object

Job


39
40
41
# File 'lib/qyu/store/base.rb', line 39

def persist_job(_workflow, _payload)
  fail Qyu::Errors::NotImplementedError
end

#persist_workflow(name, descriptor) ⇒ Object

Workflow


18
19
20
# File 'lib/qyu/store/base.rb', line 18

def persist_workflow(name, descriptor)
  fail Qyu::Errors::NotImplementedError
end

#renew_lock_lease(_id, _lease_time, _lease_token) ⇒ Object


89
90
91
# File 'lib/qyu/store/base.rb', line 89

def renew_lock_lease(_id, _lease_time, _lease_token)
  fail Qyu::Errors::NotImplementedError
end

#select_jobs(_limit, _offset, _order = :asc) ⇒ Object


47
48
49
# File 'lib/qyu/store/base.rb', line 47

def select_jobs(_limit, _offset, _order = :asc)
  fail Qyu::Errors::NotImplementedError
end

#select_tasks_by_job_idObject


101
102
103
# File 'lib/qyu/store/base.rb', line 101

def select_tasks_by_job_id
  fail Qyu::Errors::NotImplementedError
end

#task_status_counts(_job_id) ⇒ Object


97
98
99
# File 'lib/qyu/store/base.rb', line 97

def task_status_counts(_job_id)
  fail Qyu::Errors::NotImplementedError
end

#transactionObject


13
14
15
# File 'lib/qyu/store/base.rb', line 13

def transaction
  fail Qyu::Errors::NotImplementedError
end

#unlock_task!(_id, _lease_token) ⇒ Object


85
86
87
# File 'lib/qyu/store/base.rb', line 85

def unlock_task!(_id, _lease_token)
  fail Qyu::Errors::NotImplementedError
end

#update_status(_id, _status) ⇒ Object


93
94
95
# File 'lib/qyu/store/base.rb', line 93

def update_status(_id, _status)
  fail Qyu::Errors::NotImplementedError
end