This is a better fix related to the previous commit.

The previous commit had synchronization problems due to the fact that the threads now make 2 HTTP requests (not 1). The problem is, those 2 HTTP requests MUST share the same session, but if other threads use that same session to query other requests, the session_id on gestió acadèmica backend will refer to other subjects. It's a typical multithreading issue, when we have multiple steps that must be executed atomically, and the previous session didn't account for that.

So, what do I do now?

Easy enough. SESSION is now a thread local variable. That is, each thread has its own session. This way, even if multiple threads are making simultaneous requests to the backend, each thread has its own isolated session that can use to make sequental requests and keeping the session id aligned with the data we are requesting. Basically, quite a lot of pain just to get around the lack of an idempotent API by gestió acadèmica.
lesson request start and end dates are not hardcoded. They use a variable from the settings file now. With this, if no further problems appear, I consider the last issue with gestió acadèmica backend solved.