1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 module ArvadosModelUpdates
6 # ArvadosModel checks this to decide whether it should update the
7 # 'modified_by_user_uuid' field.
9 Thread.current[:anonymous_updater] || false
12 def leave_modified_by_user_alone
13 anonymous_updater_was = anonymous_updater
15 Thread.current[:anonymous_updater] = true
18 Thread.current[:anonymous_updater] = anonymous_updater_was
22 # ArvadosModel checks this to decide whether it should update the
23 # 'modified_at' field.
25 Thread.current[:timeless_updater] || false
28 def leave_modified_at_alone
29 timeless_updater_was = timeless_updater
31 Thread.current[:timeless_updater] = true
34 Thread.current[:timeless_updater] = timeless_updater_was