Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ccannon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
ccannon
11y ago
Re #7: Why have a function wrap it at all if all you're going to do is return the function?
32.
▲
by
ccannon
11y ago
These are excellent tips.
33.
▲
by
ccannon
11y ago
Yeah the flock documentation leaves something to be desired to say the least.
34.
▲
by
ccannon
11y ago
This is completely false. If you actually read the source code, you would discover that once the left over file is read Highlander would know that the process is not currently running, remove the old PID file, and create a new one.
35.
▲
by
ccannon
11y ago
Haha I hadn't see that before, awesome. I still standby the name as being logical and memorable.
36.
▲
by
ccannon
11y ago
This is a multi-platform solution.
37.
▲
by
ccannon
11y ago
If you want to look at it from an OO perspective I guess you could say that. It simply just only lets one python script run at a time.
38.
▲
by
ccannon
11y ago
This is a much simpler solution to a less complex problem.
39.
▲
by
ccannon
11y ago
This is not meant for distributed systems.
40.
▲
by
ccannon
11y ago
This is why I also store the creation time to avoid reused PIDs.
41.
▲
by
ccannon
11y ago
I do, but now with Highlander I've created a generic solution.
42.
▲
by
ccannon
11y ago
I think my solution is simpler, but their timeout command line argument has inspired me!
43.
▲
by
ccannon
11y ago
I think you could use this with celery tasks so as long as each worker used a different PID file.
44.
▲
by
ccannon
11y ago
This is a pure python solution.
45.
▲
by
ccannon
11y ago
To address your concerns: 1. I assume that it's the same type of process because by default the PID file is being written to the current working directory of the script. If you'd like, you can specify a location yourself to ensure
46.
▲
by
ccannon
11y ago
I always encounter the problem where I write Python scripts that run on a cron job that sometimes take longer than the interval before the same cron job will run again (e.g., I have a cron that runs every hour and one run takes 2 hours to c
47.
▲
Show HN: Highlander – Stop Overlapping Python Cron Jobs
(github.com)
28 points
by
ccannon
11y ago
|
43 comments
48.
▲
by
ccannon
11y ago
Yes md5 is broken. We've known this for quite some time.
49.
▲
by
ccannon
12y ago
Finally someone who knows what they're talking about!
50.
▲
by
ccannon
12y ago
So much so you created an account 2 minutes ago ;)