I manually start thread which runs SignalR on one page. Currently my app is running on two different servers - Contabo and Amazon. Both are windows servers.
I logged the whole process in my database and found out that the thread doesn't start on Amazon server.
public static void PushOrdersAsync()
{
int frequency = ParameterManager.GetInteger("OrderPushingFrequency");
Task t = Task.Run(() =>
{
while (mPush)
{
Thread.Sleep(frequency * 1000);
List<vOrder> orders = OrderManager.GetvOrders(OrderStatusEnum.Open);
List<vOrder> completedOrders = OrderManager.GetCompletedOrdersAll();
PushOpenOrders(orders);
PushCompletedOrders(completedOrders);
}
});
}
EDIT : I am manually starting the thread when I start the website