mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-21 15:31:48 -05:00
work around a limitation in postgres notify to properly support copying
postgres has a limitation on its notify message size (8k), and the messages we generate for deep copying functionality easily go over this limit; instead of passing a giant nested data structure across the message bus, this change makes it so that we temporarily store the JSON structure in memcached, and look it up from *within* the task see: https://github.com/ansible/tower/issues/4162
This commit is contained in:
@@ -2856,8 +2856,13 @@ def _reconstruct_relationships(copy_mapping):
|
||||
@task(queue=get_local_queuename)
|
||||
def deep_copy_model_obj(
|
||||
model_module, model_name, obj_pk, new_obj_pk,
|
||||
user_pk, sub_obj_list, permission_check_func=None
|
||||
user_pk, uuid, permission_check_func=None
|
||||
):
|
||||
sub_obj_list = cache.get(uuid)
|
||||
if sub_obj_list is None:
|
||||
logger.error('Deep copy {} from {} to {} failed unexpectedly.'.format(model_name, obj_pk, new_obj_pk))
|
||||
return
|
||||
|
||||
logger.debug('Deep copy {} from {} to {}.'.format(model_name, obj_pk, new_obj_pk))
|
||||
from awx.api.generics import CopyAPIView
|
||||
from awx.main.signals import disable_activity_stream
|
||||
|
||||
Reference in New Issue
Block a user