remote_server: Rename maybe_enqueue_audit_log_upload.

This is a rename of the previous
enqueue_register_realm_with_push_bouncer_if_needed but is clearer
about the fact that this will also upload audit logs if available.
This commit is contained in:
Tim Abbott
2023-12-10 19:59:00 -08:00
parent b9af6c7962
commit 4fe02be825
3 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ from zerver.actions.realm_settings import (
)
from zerver.lib.bulk_create import create_users
from zerver.lib.push_notifications import sends_notifications_directly
from zerver.lib.remote_server import enqueue_register_realm_with_push_bouncer_if_needed
from zerver.lib.remote_server import maybe_enqueue_audit_log_upload
from zerver.lib.server_initialization import create_internal_realm, server_initialized
from zerver.lib.streams import ensure_stream, get_signups_stream
from zerver.lib.user_groups import (
@@ -270,7 +270,7 @@ def do_create_realm(
]
)
enqueue_register_realm_with_push_bouncer_if_needed(realm)
maybe_enqueue_audit_log_upload(realm)
# Create stream once Realm object has been saved
notifications_stream = ensure_stream(

View File

@@ -28,7 +28,7 @@ from zerver.lib.markdown import markdown_convert
from zerver.lib.markdown import version as markdown_version
from zerver.lib.message import get_last_message_id
from zerver.lib.push_notifications import sends_notifications_directly
from zerver.lib.remote_server import enqueue_register_realm_with_push_bouncer_if_needed
from zerver.lib.remote_server import maybe_enqueue_audit_log_upload
from zerver.lib.server_initialization import create_internal_realm, server_initialized
from zerver.lib.streams import render_stream_description
from zerver.lib.timestamp import datetime_to_timestamp
@@ -1422,7 +1422,7 @@ def do_import_realm(import_dir: Path, subdomain: str, processes: int = 1) -> Rea
# Ask the push notifications service if this realm can send
# notifications, if we're using it. Needs to happen after the
# Realm object is reactivated.
enqueue_register_realm_with_push_bouncer_if_needed(realm)
maybe_enqueue_audit_log_upload(realm)
return realm

View File

@@ -403,7 +403,7 @@ def send_analytics_to_push_bouncer(consider_usage_statistics: bool = True) -> No
logger.info("Reported %d records", record_count)
def enqueue_register_realm_with_push_bouncer_if_needed(realm: Realm) -> None:
def maybe_enqueue_audit_log_upload(realm: Realm) -> None:
from zerver.lib.push_notifications import uses_notification_bouncer
if uses_notification_bouncer():