projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11906: use the same name "ManagementToken" to enable healthcheck in all services
[arvados.git]
/
services
/
api
/
app
/
models
/
log.rb
diff --git
a/services/api/app/models/log.rb
b/services/api/app/models/log.rb
index 3207d1f288f2f264c671d6709063d93140ce3fec..73f143e8c3c2e98f5164db5f108ce9004930460e 100644
(file)
--- a/
services/api/app/models/log.rb
+++ b/
services/api/app/models/log.rb
@@
-1,3
+1,9
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+require 'audit_logs'
+
class Log < ArvadosModel
include HasUuid
include KindAndEtag
class Log < ArvadosModel
include HasUuid
include KindAndEtag
@@
-5,6
+11,7
@@
class Log < ArvadosModel
serialize :properties, Hash
before_validation :set_default_event_at
after_save :send_notify
serialize :properties, Hash
before_validation :set_default_event_at
after_save :send_notify
+ after_commit { AuditLogs.tidy_in_background }
api_accessible :user, extend: :common do |t|
t.add :id
api_accessible :user, extend: :common do |t|
t.add :id
@@
-99,7
+106,6
@@
class Log < ArvadosModel
end
def send_notify
end
def send_notify
- connection.execute "NOTIFY logs, '#{self.id}'"
+
ActiveRecord::Base.
connection.execute "NOTIFY logs, '#{self.id}'"
end
end
-
end
end