def __init__(self, email_address, provider_name, account_id, namespace_id,
                 poll_frequency=POLL_FREQUENCY):
        bind_context(self, 'eventsync', account_id)
        # Only Google for now, can easily parametrize by provider later.
        self.provider = GoogleEventsProvider(account_id, namespace_id)

        BaseSyncMonitor.__init__(self,
                                 account_id,
                                 namespace_id,
                                 email_address,
                                 EVENT_SYNC_FOLDER_ID,
                                 EVENT_SYNC_FOLDER_NAME,
                                 provider_name,
                                 poll_frequency=poll_frequency)
Example #2
0
    def __init__(self, email_address, provider_name, account_id, namespace_id,
                 poll_frequency=POLL_FREQUENCY):
        bind_context(self, 'eventsync', account_id)
        # Only Google for now, can easily parametrize by provider later.
        self.provider = GoogleEventsProvider(account_id, namespace_id)
        self.log = logger.new(account_id=account_id, component='calendar sync')

        BaseSyncMonitor.__init__(self,
                                 account_id,
                                 namespace_id,
                                 email_address,
                                 EVENT_SYNC_FOLDER_ID,
                                 EVENT_SYNC_FOLDER_NAME,
                                 provider_name,
                                 poll_frequency=poll_frequency,
                                 scope='calendar')
Example #3
0
    def __init__(self, email_address, provider_name, account_id, namespace_id,
                 poll_frequency=300):
        bind_context(self, 'contactsync', account_id)
        self.provider_name = provider_name

        provider_cls = CONTACT_SYNC_PROVIDER_MAP[self.provider_name]
        self.provider = provider_cls(account_id, namespace_id)

        BaseSyncMonitor.__init__(self,
                                 account_id,
                                 namespace_id,
                                 email_address,
                                 CONTACT_SYNC_FOLDER_ID,
                                 CONTACT_SYNC_FOLDER_NAME,
                                 provider_name,
                                 poll_frequency=poll_frequency,
                                 scope='contacts')
    def __init__(self, email_address, provider_name, account_id, namespace_id,
                 poll_frequency=300):
        bind_context(self, 'contactsync', account_id)
        self.provider_name = provider_name

        provider_cls = CONTACT_SYNC_PROVIDER_MAP[self.provider_name]
        self.provider = provider_cls(account_id, namespace_id)

        BaseSyncMonitor.__init__(self,
                                 account_id,
                                 namespace_id,
                                 email_address,
                                 CONTACT_SYNC_FOLDER_ID,
                                 CONTACT_SYNC_FOLDER_NAME,
                                 provider_name,
                                 poll_frequency=poll_frequency,
                                 retry_fail_classes=[ValidationError])
Example #5
0
    def __init__(self,
                 email_address,
                 provider_name,
                 account_id,
                 namespace_id,
                 poll_frequency=300):
        bind_context(self, 'eventsync', account_id)
        # Only Google for now, can easily parametrize by provider later.
        self.provider = GoogleEventsProvider(account_id, namespace_id)

        BaseSyncMonitor.__init__(self,
                                 account_id,
                                 namespace_id,
                                 email_address,
                                 EVENT_SYNC_FOLDER_ID,
                                 EVENT_SYNC_FOLDER_NAME,
                                 provider_name,
                                 poll_frequency=poll_frequency)
Example #6
0
    def __init__(
        self, email_address, provider_name, account_id, namespace_id, poll_frequency=300
    ):
        bind_context(self, "contactsync", account_id)
        self.provider_name = provider_name

        provider_cls = CONTACT_SYNC_PROVIDER_MAP[self.provider_name]
        self.provider = provider_cls(account_id, namespace_id)

        BaseSyncMonitor.__init__(
            self,
            account_id,
            namespace_id,
            email_address,
            CONTACT_SYNC_FOLDER_ID,
            CONTACT_SYNC_FOLDER_NAME,
            provider_name,
            poll_frequency=poll_frequency,
            scope="contacts",
        )