diff options
Diffstat (limited to 'doc/devblog')
-rw-r--r-- | doc/devblog/day_29__scheduling.mdwn | 10 | ||||
-rw-r--r-- | doc/devblog/day_30__cronner.mdwn | 17 | ||||
-rw-r--r-- | doc/devblog/day_30__cronner/comment_1_53dfd9310e92f5225db52a13e20a46d4._comment | 10 | ||||
-rw-r--r-- | doc/devblog/day_30__cronner/comment_2_f98357c6f7a6da23873ac27c2e1e9638._comment | 10 | ||||
-rw-r--r-- | doc/devblog/day_31__blah.mdwn | 17 |
5 files changed, 64 insertions, 0 deletions
diff --git a/doc/devblog/day_29__scheduling.mdwn b/doc/devblog/day_29__scheduling.mdwn new file mode 100644 index 000000000..98c928bf8 --- /dev/null +++ b/doc/devblog/day_29__scheduling.mdwn @@ -0,0 +1,10 @@ +Spent most of the day building some generic types for scheduling recurring +events. Not sure if rolling my own was a good idea, but that's what I did. + +In the incrementalfsck branch, I have hooked this up in `git-annex vicfg`, +which now accepts and parses scheduled events like +"fsck self every day at any time for 60 minutes" and +"fsck self on day 1 of weeks divisible by 2 at 3:45 for 120 minutes", and +stores them in the git-annex branch. The exact syntax is of course subject +to change, but also doesn't matter a whole lot since the webapp will have +a better interface. diff --git a/doc/devblog/day_30__cronner.mdwn b/doc/devblog/day_30__cronner.mdwn new file mode 100644 index 000000000..f368407ca --- /dev/null +++ b/doc/devblog/day_30__cronner.mdwn @@ -0,0 +1,17 @@ +Lots of progress from yesterday's modest start of building data types for +scheduling. Last night I wrote the hairy calendar code to calculate when +next to run a scheduled event. (This is actually quite superior to `cron`, +which checks every second to see if it should run each event!) Today I +built a "Cronner" thread that handles spawning threads to handle each +scheduled event. It even notices when changes have been made to the its +schedule and stops/starts event threads appropriately. + +Everything is hooked up, building, and there's a good chance it works +without too many bugs, but while I've tested all the pure code (mostly +automatically with quickcheck properties), I have not run the Cronner +thread at all. And there is some tricky stuff in there, like noticing +that the machine was asleep past when it expected to wake up, and deciding +if it should still run a scheduled event, or should wait until next time. +So tomorrow we'll see.. + +Today's work was sponsored by Ethan Aubin. diff --git a/doc/devblog/day_30__cronner/comment_1_53dfd9310e92f5225db52a13e20a46d4._comment b/doc/devblog/day_30__cronner/comment_1_53dfd9310e92f5225db52a13e20a46d4._comment new file mode 100644 index 000000000..dc0c7dfe1 --- /dev/null +++ b/doc/devblog/day_30__cronner/comment_1_53dfd9310e92f5225db52a13e20a46d4._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://nullroute.eu.org/~grawity/" + nickname="Mantas" + subject="comment 1" + date="2013-10-09T06:04:15Z" + content=""" +The SysV Unix *cron* learned this same thing [in 1979][1]. + +[1]: http://en.wikipedia.org/wiki/Cron#Multi-user_capability +"""]] diff --git a/doc/devblog/day_30__cronner/comment_2_f98357c6f7a6da23873ac27c2e1e9638._comment b/doc/devblog/day_30__cronner/comment_2_f98357c6f7a6da23873ac27c2e1e9638._comment new file mode 100644 index 000000000..0fc310a78 --- /dev/null +++ b/doc/devblog/day_30__cronner/comment_2_f98357c6f7a6da23873ac27c2e1e9638._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="4.154.4.22" + subject="comment 2" + date="2013-10-11T17:07:24Z" + content=""" +However, if you strace a traditional cron, you will be sad at how it's implemented. So much statting of files, and checking of entries every second.. + +0 polling or redundant calulcation in my code! +"""]] diff --git a/doc/devblog/day_31__blah.mdwn b/doc/devblog/day_31__blah.mdwn new file mode 100644 index 000000000..672adbfd3 --- /dev/null +++ b/doc/devblog/day_31__blah.mdwn @@ -0,0 +1,17 @@ +Some neat stuff is coming up, but today was a pretty blah day for me. +I did get the Cronner tested and working (only had a few little bugs). But +I got stuck for quite a while making the Cronner stop `git-annex fsck` +processes it was running when their jobs get removed. I had some code to do +this that worked when run standalone, but not when run from git-annex. + +After considerable head-scratching, I found out this was due to +`forkProcess` masking aync exceptions, which seems to be probably +[a bug](http://ghc.haskell.org/trac/ghc/ticket/8433). Luckily was able to +work around it. Async exceptions continue to strike me as the worst part of +the worst part of Haskell (the worst part being exceptions in general). + +Was more productive after that.. Got the assistant to automatically queue +re-downloads of any files that fsck throws out due to having bad contents, +and made the webapp display an alert while fscking is running, which will +go to the page to configure fsck schedules. Now all I need to do is +build the UI of that page. |