pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev2023-02-01 01:57 am
Entry tags:

Question thread #118

It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
solarbird: (Default)

Re: well howdy

[personal profile] solarbird 2023-02-07 09:10 pm (UTC)(link)
For context, what I'm doing is taking the existing official Wordpress-maintained Livejournal importer and make it work against Dreamwidth. I thought this would be like four lines of code changes to point to proper servers. I was very wrong.

I'm not handing Dreamwidth repeated lastsyncs. That is not a thing I am doing. This was happening, but I have coded around it. This code is fugly but that's not important right now, it works.

It turned out eventually that the reason I was having a problem with repeated lastsyncs is:

Dreamwidth is giving me the same lastsync over and over again.

The importer works as you'd expect for the first 4125 entries, then I start getting the same lastsync from Dreamwidth when trying to iterate through all items.

If it matters, they're also all C- items, not L- items. I'm wondering if this has anything to do with when when I imported everything from Livejournal to here, though that's kind of a guess and I don't even remember when I bailed on LJ.

The last L- item I get is 2011-11-22 08:03:50.000000, then it's all C- items with repeated lastsync numbers.

If I let my "let's not trigger repeat detection" code and start switching up my requests on it (and that's some stupid code let me tell you but it works) then eventually it starts incrementing lastsync again - by between one and a small number of seconds. They're still all C- items.

If I let _that_ run long enough to try to chew through all the C- items, Dreamwidth stops responding to authentication before I get to the end of total items.

Excerpted from a massive debug lot, here's the last L- item, followed by the "C-" flood starting. As you can see, the item numbers keep changing, but the lastsync doesn't.

[124] => Array ( [action] => update [item] => L-467 [time] => 2011-11-22 08:03:50.000000 )
[125] => Array ( [action] => update [item] => C-481 [time] => 2011-11-26 07:04:24.000000 )
[126] => Array ( [time] => 2011-11-26 07:04:24.000000 [item] => C-473 [action] => update )
[127] => Array ( [action] => update [item] => C-489 [time] => 2011-11-26 07:04:24.000000 )
[128] => Array ( [action] => update [time] => 2011-11-26 07:04:24.000000 [item] => C-483 )
[129] => Array ( [item] => C-482 [time] => 2011-11-26 07:04:24.000000 [action] => update )
[130] => Array ( [action] => update [time] => 2011-11-26 07:04:24.000000 [item] => C-474 )
[131] => Array ( [item] => C-491 [time] => 2011-11-26 07:04:25.000000 [action] => update )
[132] => Array ( [time] => 2011-11-26 07:04:25.000000 [item] => C-499 [action] => update )
[133] => Array ( [action] => update [time] => 2011-11-26 07:04:25.000000 [item] => C-498 )
[134] => Array ( [time] => 2011-11-26 07:04:25.000000 [item] => C-492 [action] => update )
[135] => Array ( [item] => C-495 [time] => 2011-11-26 07:04:25.000000 [action] => update )
[136] => Array ( [action] => update [item] => C-496 [time] => 2011-11-26 07:04:25.000000 )
[137] => Array ( [action] => update [time] => 2011-11-26 07:04:25.000000 [item] => C-500 )
[138] => Array ( [action] => update [item] => C-516 [time] => 2011-11-26 07:04:26.000000 )
[139] => Array ( [action] => update [time] => 2011-11-26 07:04:26.000000 [item] => C-515 )
[140] => Array ( [item] => C-518 [time] => 2011-11-26 07:04:26.000000 [action] => update )
[141] => Array ( [action] => update [item] => C-519 [time] => 2011-11-26 07:04:26.000000 )
[142] => Array ( [action] => update [item] => C-514 [time] => 2011-11-26 07:04:26.000000 )
[143] => Array ( [item] => C-503 [time] => 2011-11-26 07:04:26.000000 [action] => update )
[144] => Array ( [item] => C-517 [time] => 2011-11-26 07:04:26.000000 [action] => update )
[145] => Array ( [action] => update [time] => 2011-11-26 07:04:27.000000 [item] => C-520 )
[146] => Array ( [action] => update [item] => C-524 [time] => 2011-11-26 07:04:27.000000 )
[147] => Array ( [action] => update [item] => C-525 [time] => 2011-11-26 07:04:27.000000 )