-
Notifications
You must be signed in to change notification settings - Fork 369
Expand file tree
/
Copy pathapp_usage_event.rb
More file actions
27 lines (24 loc) · 890 Bytes
/
app_usage_event.rb
File metadata and controls
27 lines (24 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module VCAP::CloudController
class AppUsageEvent < Sequel::Model
plugin :serialization
export_attributes :state, :previous_state,
:memory_in_mb_per_instance, :previous_memory_in_mb_per_instance,
:instance_count, :previous_instance_count,
:app_guid, :app_name, :space_guid, :space_name, :org_guid,
:buildpack_guid, :buildpack_name,
:package_state, :previous_package_state, :parent_app_guid,
:parent_app_name, :process_type, :task_name, :task_guid
def self.usage_lifecycle
{
beginning_state: ProcessModel::STARTED,
ending_state: ProcessModel::STOPPED,
guid_column: :app_guid
}.freeze
end
AppUsageEvent.dataset_module do
def supports_window_functions?
false
end
end
end
end