I am trying to create a csgo trading website where the users can withdraw and deposit skins. To do so I have created a bot account that sends trading offers to the customer. Now I need to somehow confirm that the trade was accepted by the user. I am new to this so there might be a better, simple solution that I just can't figure out. I am using steampy library.
What I think would be the solution is to run a function loop that checks for the offers and their state. And on state change would update the database. But I do not know how I can create a function like this in Django so the server would also be running at the same time. I want to also use this project in production so running a script from my computer isn't the solution.
Can someone please help me with the issue or lead me in the right direction?
CodePudding user response:
the solution for your problem would be to use BackgroundSchedulers and/or Cron jobs. These work in the background and won't affect your django server so you can server files and data as usual.
I personally use APScheduler for my django application to scheduler background tasks, it is an amazing module but requires some documentation. It has different types of task scheduler so you can try them.