/// <summary>
 /// Convert to message trigger configuration
 /// </summary>
 /// <param name="model"></param>
 /// <param name="publisherId"></param>
 /// <returns></returns>
 public static IWriterGroupConfig ToWriterGroupJobConfiguration(
     this WriterGroupJobModel model, string publisherId)
 {
     return(new WriterGroupJobConfig {
         BatchSize = model.Engine?.BatchSize,
         PublisherId = publisherId,
         DiagnosticsInterval = model.Engine?.DiagnosticsInterval,
         WriterGroup = model.WriterGroup
     });
 }
Esempio n. 2
0
        /// <summary>
        /// Returns the job Id
        /// </summary>
        public static string GetJobId(this WriterGroupJobModel model)
        {
            var connection = model?.WriterGroup?.DataSetWriters?.First()?.DataSet?.DataSetSource?.Connection;

            if (connection == null)
            {
                return(null);
            }

            return(connection.CreateConnectionId());
        }
Esempio n. 3
0
 /// <summary>
 /// Convert to message trigger configuration
 /// </summary>
 /// <param name="model"></param>
 /// <param name="publisherId"></param>
 /// <returns></returns>
 public static IWriterGroupConfig ToWriterGroupJobConfiguration(
     this WriterGroupJobModel model, string publisherId)
 {
     return(new WriterGroupJobConfig {
         BatchSize = model.Engine?.BatchSize,
         BatchTriggerInterval = model.Engine?.BatchTriggerInterval,
         PublisherId = publisherId,
         DiagnosticsInterval = model.Engine?.DiagnosticsInterval,
         WriterGroup = model.WriterGroup,
         MaxMessageSize = model.Engine?.MaxMessageSize,
         MaxEgressMessageQueue = model.Engine?.MaxEgressMessageQueue
     });
 }