Esempio n. 1
0
        private void RunUpdateDatafeed(long companyId)
        {
            var companyfunction = new CompanyFunctions();
            var company         = new Company(Common.Obj2Int64(companyId));

            companyfunction.UpdateDataFeedProducts(company, cancelUpdateDataFeedTokenSource);
        }
Esempio n. 2
0
        private void UpdateDataFeedProducts3(byte[] message)
        {
            Thread.Sleep(10000);
            JobRabbitMQ jobReceived = ProtobufTool.DeSerialize <JobRabbitMQ>(message);

            if (jobReceived.JobName == "UpdateDatafeed")
            {
                if (jobReceived.JobType == 1)
                {
                    Log.InfoFormat("Consumer3 worked with CompanyID = {0}", jobReceived.JobInformation);
                    QT.Entities.Server.ConnectionString = connectionString;
                    CompanyFunctions companyfuncition = new CompanyFunctions();
                    Company          company          = new Company(Common.Obj2Int64(jobReceived.JobInformation));
                    cancelUpdateDataFeedTokenSource = new CancellationTokenSource();
                    companyfuncition.UpdateDataFeedProducts(company, cancelUpdateDataFeedTokenSource);
                }
            }
        }