Home » Developing U++ » U++ Developers corner » Skylark timer jobs...
Re: Skylark timer jobs... [message #40928 is a reply to message #40924] |
Tue, 08 October 2013 21:10 |
|
mirek wrote on Tue, 08 October 2013 19:55 |
dolik.rce wrote on Tue, 08 October 2013 12:13 | Wouldn't separate timer in each preforked process could cause same job running in each process?
|
Well, of course, you would have to somehow make sure that jobs scheduled before prefork are not inherited to child processes. Other than that, I think everything is OK (or not?
| All the preforked processes are equal, so they'd all run same jobs over time, because they wouldn't know it has already been taken care of by some other process. Or am I missing something?
mirek wrote on Tue, 08 October 2013 19:55 |
Quote: |
What do you think about the solution I proposed in RM? Do you have any specific arguments against this?
|
Well, perhaps, but it sounds quite complicated and 'feels' error-prone.
| It depends how complex the functionality would be. Simple running and stopping non-parameter callbacks should be quite easy to do right. More advanced stuff would probably get trickier.
mirek wrote on Tue, 08 October 2013 19:55 |
Quote: |
mirek wrote on Mon, 07 October 2013 09:23 | Related question (issue?): for the task you suggest (deleting obsolete sessions), I would normally use standard cron job. I mean I really do not see advantage of proposed job queue to normal cron job. Is there any?
| Simplicity Many users (including me) like that U++ allows you to deploy whole application by deploying single executable.
|
Thats not mutually exclusive. We run many cron jobs in our server environment. All are implemented with single binary, which has many modes represented on commandline... That way, all code is easily shared.
| I admit I didn't think of that Having multiple apps in single binary sounds little obscure at first, but I guess it is not bad in any sense (thinking of it, busybox uses this trick for years...).
So the last argument for this seems to be ability to run in environments where cron is not available. Having little dependencies was always considered good thing in U++ But I'm not sure that this argument is valid, because I haven't met any cron-less such system for very long time... Perhaps some very cheap vps providers, but it's probably very rare. Or windows, but even there, there is the task scheduler or what it's called...
Honza
|
|
|
Goto Forum:
Current Time: Tue May 21 11:00:39 CEST 2024
Total time taken to generate the page: 0.01741 seconds
|