?

Log in

No account? Create an account
Edit Event Workaround - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Edit Event Workaround [Jul. 29th, 2002|11:49 am]
LiveJournal Client Discussions

lj_clients

[pyran]
So I'm trying to change the security of posts en masse (all entries, by month, or by day). The problem is that it looks like I need 2 server hits per post, minimum (more if you keep in mind that half the time I get ServerProtocolViolations -- according to the .NET docs, "The server response was not a valid HTTP response."). If someone is changing 500 entries, and each server hit takes 5 seconds, that adds up pretty quickly. Now imagine if that was 5000.

What are the hits?
1.) Get the itemid using getevent (displayitemid is the one that export.bml gives, and that is (itemid + a random number) * 256, so you need to get the actual id).
2.) The actual editevent hit.

Does anyone know of a workaround for this? Is there one? I'd like to think that changing a journal's security (something I've heard a lot of calls for) wouldn't require running the program for 15 straight hours to do it.
linkReply

Comments:
From: evan
2002-07-29 08:08 am (UTC)
Use the syncitems mode to grab a local copy of the journal, then run one editevent per entry.

Probably would be more worth your time just to submit a patch that works on the server end:
http://cvs.livejournal.org
(Reply) (Thread)
[User Picture]From: youngoat
2002-07-29 06:05 pm (UTC)

a couple cents or something.

You should be able to do an integer divide on the displayitemid, no? Just divide by 256, dropping the remainder. (or shift the bits 8 places to the right... same thing)

But still, what evan says is true. syncitems would be a better way to go. Only takes a couple server hits to get 500 entries. And writing a server-side patch would be even better, since you don't actually even need anything except the itemid's it's a waste to download the full events.
(Reply) (Thread)