0

Suggest me where to use threading timer in django project.

I'm working on developing a online bidding application (my project). where clients post their bidding price to server. the highest bidder wins the bidding. my current approach: planning on using a timer that triggers a function (bidding_stop()) which stops the bidding and checks for highest bidder and announces the winner. My question is where to place this timer. so that it will trigger that operation (bidding_stop()) after a pre-set time from the start of server. Project name is "Bidding_proj" and has one app "bid_app" and rest are default.

29th Dec 2020, 6:37 AM
Sathish Kanna
Sathish Kanna - avatar
5 ответов
+ 1
thanks for your support @Slick
29th Dec 2020, 8:00 AM
Sathish Kanna
Sathish Kanna - avatar
0
Use datetime, and then set the bidding_stop() after however long
29th Dec 2020, 7:46 AM
Slick
Slick - avatar
0
i don't get it why you suggest using datetime...
29th Dec 2020, 7:52 AM
Sathish Kanna
Sathish Kanna - avatar
0
idk mabey cause it uses time? and you can time stuff with time. cause you are making a timer. It wouldnt matter where you place it if you just start it when the server starts and reset when the time was done. i dont get why you wouldn't use it
29th Dec 2020, 7:55 AM
Slick
Slick - avatar
0
If you want to use a timer then you can use JavaScript setTimeout and send an ajax request to django to stop bidding.
30th Dec 2020, 6:05 AM
AJAY LINGAYAT
AJAY LINGAYAT - avatar