Module mailchimp_syncer

Module mailchimp_syncer 

Source

ModulesΒ§

batch_client πŸ”’
mailchimp_ops πŸ”’
policy_tags πŸ”’

StructsΒ§

EmailSyncResult πŸ”’
FieldSchema πŸ”’
MailchimpField πŸ”’
SyncUser πŸ”’
SyncerConfig πŸ”’
Structure to hold the configuration settings, such as the database URL.

ConstantsΒ§

BATCH_POLL_INTERVAL_SECS πŸ”’
BATCH_POLL_TIMEOUT_SECS πŸ”’
BATCH_SIZE πŸ”’
FIELDS_EXCLUDED_FROM_REMOVING πŸ”’
These fields are excluded from removing all fields that are not in the schema
PRINT_STILL_RUNNING_MESSAGE_TICKS_THRESHOLD πŸ”’
PROCESS_UNSUBSCRIBES_INTERVAL_SECS πŸ”’
REMOVE_UNSUPPORTED_FIELDS πŸ”’
REQUIRED_FIELDS πŸ”’
SYNC_INTERVAL_SECS πŸ”’

FunctionsΒ§

add_field_to_mailchimp πŸ”’
Adds a new merge field to the Mailchimp list.
ensure_mailchimp_schema πŸ”’
Ensures the Mailchimp schema is up to date, adding required fields and removing any extra ones.
fetch_current_mailchimp_fields πŸ”’
Fetches the current merge fields from the Mailchimp list schema.
fetch_unsubscribed_users_from_mailchimp_in_chunks πŸ”’
Fetches data from Mailchimp in chunks.
initialize_configuration πŸ”’
Initializes and returns configuration settings (database URL).
initialize_database_pool πŸ”’
Initializes the PostgreSQL connection pool from the provided database URL.
initialize_environment πŸ”’
Initializes environment variables, logging, and tracing setup.
main
The main function that initializes environment variables, config, and sync process.
process_unsubscribed_users_from_mailchimp πŸ”’
remove_field_from_mailchimp πŸ”’
Removes a merge field from the Mailchimp list by with a field ID.
send_users_to_mailchimp
Sends a batch of users to Mailchimp for synchronization.
sync_completed_tag_for_members πŸ”’
Sets or removes the β€œ{slug}-completed” tag on Mailchimp members based on course completion. Skips users without user_mailchimp_id.
sync_contacts πŸ”’
Synchronizes the user contacts with Mailchimp. Added a boolean flag to determine whether to process unsubscribes.
sync_tags_from_mailchimp
Fetch tags from mailchimp and sync the changes to the database
update_emails_in_mailchimp πŸ”’
Updates the email addresses of multiple users in a Mailchimp mailing list.