send 1K objects every 30 minutes
This commit is contained in:
parent
8caca826cb
commit
f98043599f
|
|
@ -25,7 +25,7 @@ namespace birzha_contracts.Jobs{
|
|||
{
|
||||
var dbContext = scope.ServiceProvider.GetService<MvcContractContext>();
|
||||
|
||||
var contracts = dbContext.Contract.OrderByDescending(d => d.RegDate).Take(1).ToList();
|
||||
var contracts = dbContext.Contract.OrderByDescending(d => d.RegDate).Take(1000).ToList();
|
||||
|
||||
var data = JsonConvert.SerializeObject(contracts);
|
||||
|
||||
|
|
@ -38,13 +38,6 @@ namespace birzha_contracts.Jobs{
|
|||
request.Content = content;
|
||||
|
||||
var response = client.Send(request);
|
||||
|
||||
|
||||
// var data = JsonConvert.SerializeObject(contracts);
|
||||
|
||||
// var content = new StringContent(data.ToString(), Encoding.UTF8, "application/json");
|
||||
|
||||
// var response = await client.PostAsync("http://ba.digital-tps.tk/api/contract/import", content);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Success!");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"UpdateTime":"0/30 * * * * ?",
|
||||
"UpdateTime":"0,30 * * * * ?",
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MvcContractContext": "Server=.\\SQLEXPRESS;Database=clmDB2;User Id=admin;Password=qazwsx12"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"UpdateTime":"0/30 * * * * ?",
|
||||
"UpdateTime":"0,1 * * * * ?",
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MvcContractContext": "Server=.\\SQLEXPRESS;Database=clmDB2;User Id=admin;Password=qazwsx12"
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -95,3 +95,4 @@
|
|||
2.0
|
||||
2.0
|
||||
2.0
|
||||
2.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue