Пример #1
0
        public async Task <string> UpsertRow(ReminderEntry entry)
        {
            try
            {
                if (logger.IsEnabled(LogLevel.Debug))
                {
                    logger.Debug("UpsertRow entry = {0}", entry.ToString());
                }
                ReminderTableEntry remTableEntry = ConvertToTableEntry(entry, remTableManager.ServiceId, remTableManager.DeploymentId);

                string result = await remTableManager.UpsertRow(remTableEntry);

                if (result == null)
                {
                    logger.Warn((int)AzureUtils.Utilities.ErrorCode.AzureTable_45,
                                $"Upsert failed on the reminder table. Will retry. Entry = {entry.ToString()}");
                }
                return(result);
            }
            catch (Exception exc)
            {
                logger.Warn((int)AzureUtils.Utilities.ErrorCode.AzureTable_42,
                            $"Intermediate error upserting reminder entry {entry.ToString()} to the table {remTableManager.TableName}.", exc);
                throw;
            }
        }
Пример #2
0
        public async Task <string> UpsertRow(ReminderEntry entry)
        {
            try
            {
                if (logger.IsVerbose)
                {
                    logger.Verbose("UpsertRow entry = {0}", entry.ToString());
                }
                ReminderTableEntry remTableEntry = ConvertToTableEntry(entry, remTableManager.ServiceId, remTableManager.DeploymentId);

                string result = await remTableManager.UpsertRow(remTableEntry);

                if (result == null)
                {
                    logger.Warn(ErrorCode.AzureTable_45, String.Format("Upsert failed on the reminder table. Will retry. Entry = {0}", entry.ToString()));
                }
                return(result);
            }
            catch (Exception exc)
            {
                logger.Warn(ErrorCode.AzureTable_42, String.Format("Intermediate error upserting reminder entry {0} to the table {1}.",
                                                                   entry.ToString(), remTableManager.TableName), exc);
                throw;
            }
        }