Forums

Scheduler

Hi, I've been working on a web app on django and I'm using a free account in order to perform testing, and everything's going well. I'm seriously thinking in upgrade to a custom account, (more apps, own domain, etc..), since my solution will require 2 apps:

1) A web site (as I said, everything is ok!) 2) A backend app that perform scheduling tasks... (oops!)

I've been looking at AP forums and there are lots of topics about users having problems developing this kind of tasks, so I have some questions.

Why celery is not supported on AP environment? Is it because rabbitmq? Won't it work even locally? I understand that start/stop/restart of a task has to be managed by hand.

APScheduler will work on AP?

Each web app is isolated from the rest?

thanks in advance.

What about redis, is there a way to make it run locally?... (localhost, not talking about a free account)

thanks.

Hi there -- we don't support redis, Celery or RabbitMQ because our infrastructure doesn't currently handle long-running tasks well enough for it to be usable. It looks like this might also apply to APScheduler, though I don't have enough experience with it to know for sure... it appears to be designed to run inside your web app process...? That would cause problems on PythonAnywhere because your web app is handled by multiple processes -- the exact number depends on what kind of account you have, paid plans have more than free, and more expensive paid plans have more than cheaper ones.

Regarding web app isolation -- all of your own web apps run in the same sandbox, but that sandbox is completely private to you. No other users can see your code or files (unless you explicitly serve them up via your web app, of course).

I think we do have a few users using celery via the scheduled tasks hack actually, but as Giles said, the fact that it gets killed every so often and has to be restarted is less than ideal. Still, it might be worth a try with APScheduler too.

Has anyone tried APScheduler? Any luck getting it to work with Flask (or any other framework)?