Post Ab1WIcAifdLQsWaggC by efertone@slippy.xyz
(DIR) More posts by efertone@slippy.xyz
(DIR) Post #Ab1WIcAifdLQsWaggC by efertone@slippy.xyz
2023-10-22T08:19:02.128Z
1 likes, 1 repeats
Traceback (most recent call last): File "/home/efertone/slippy-maintenance/clean-old-remote-files.py", line 57, in files = list_old_files() File "/home/efertone/slippy-maintenance/clean-old-remote-files.py", line 40, in list_old_files cursor.execute(query)psycopg2.errors.UndefinedColumn: column "createdAt" does not existLINE 2: select "id", "createdAt", "userHost", "accessKey", "thumbnai... ^ffs, they removed the createdAt column from the table, i checked and they replaced it with nothing :( we don't know how old is a file from the database so I can't clean up old files to prevent growing it to over TBs.#misskey @syuilo@misskey.io :(
(DIR) Post #Ab1WLjDuuRZzcKZSxU by syuilo@misskey.io
2023-10-22T08:35:05.655Z
0 likes, 0 repeats
@efertone@slippy.xyz 時刻からAIDを生成して比較することができますhttps://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/misc/id/aid.ts
(DIR) Post #Ab1WLk8HWsfMR8wToW by efertone@slippy.xyz
2023-10-22T08:44:40.640Z
0 likes, 0 repeats
@syuilo@misskey.io That would require to select all rows and manually parse the aid timestamp part and compare it.Previously it was a simple:select "id", "createdAt", "userHost", "accessKey", "thumbnailAccessKey" from drive_file where "userHost" != '' and "createdAt" < NOW() - INTERVAL '2 months' order by "createdAt" descand I made an API call to all of those files to be deleted.With parsing from AID i would have to select all, parse aid and make api call if required.misskey=> select count(1) from drive_file; count--------- 1654924(1 row)with the simple query on timestamp the result on the select was around 15-20k running daily.
(DIR) Post #Ab1WLkooyih4Z4qS7U by syuilo@misskey.io
2023-10-22T08:48:28.762Z
0 likes, 0 repeats
@efertone@slippy.xyz 指定の時刻のAIDより小さい(つまり古い)IDを持つレコードをwhereで指定するのではダメですか?また、- Issueを作成して頂いた方がより広い意見が期待できます。- Misskeyではデータベースを手動で操作するのは推奨していません。
(DIR) Post #Ab1WLlsl1ZR7rZh6tU by efertone@slippy.xyz
2023-10-22T09:04:16.856Z
1 likes, 0 repeats
@syuilo@misskey.io I don't manipulate the database manually :P That's why I delete with the API call, I just query it and that's read only.I'm not going to create a github issue as it will never be resolved really (yes I lost all hope in github issues on the repo already), and recently every version breaks something and it feels like "compatibility" as a word doesn't exist anymore. :(As a user I love misskey, but as a maintainer in the last half a year or a year, it's really a pain in the ass. And I'm not the only one because in the last few months more and more people had issues with upgrades, config changes.
(DIR) Post #Ab1X0QfSntjjwNrafw by Maholmire@shitpost.cloud
2023-10-22T09:15:03.896053Z
0 likes, 0 repeats
Say, @emma do you happen to know anything that might help?
(DIR) Post #Ab1X5X2QXvrp972OLA by emma@niscii.xyz
2023-10-22T09:15:57.697Z
1 likes, 0 repeats
@Maholmire@shitpost.cloud no, efertone knows misskey much better than me. i didnt even notice they'd removed this column
(DIR) Post #Ab1Ym6MngZFUpfQhf6 by efertone@slippy.xyz
2023-10-22T09:19:56.835Z
1 likes, 0 repeats
@Maholmire@shitpost.cloud @emma@niscii.xyz trying to figure out how the hell typescript/japascript toString() with radix works. I hoped it's a simple "int to string with baseN" but no, numpy.base_repr(t, base=32) gives a different result. I guess I'll be super lazy and just ask node through a Popen call :boomer_laugh:
(DIR) Post #Ab1tNK2xmhVN3fB0nA by efertone@slippy.xyz
2023-10-22T13:15:21.460Z
1 likes, 0 repeats
@Maholmire@shitpost.cloud @emma@niscii.xyz Well I was stupid, it's base=36 :picard_facepalm:and done, here is the patched script that uses ID: https://gitea.code-infection.com/efertone/snippets/commit/e845bd41f08906928125b30577639d868d273dfe(it needs numpy, so you may need to install that with pip or your package manager)
(DIR) Post #Ab1tcIuwGY57tnZDlI by emma@niscii.xyz
2023-10-22T13:28:23.749Z
0 likes, 0 repeats
@efertone@slippy.xyz @Maholmire@shitpost.cloud i wonder if suddenly removing a property like this is why the admin/federation/remove-all-following endpoint doesnt work either. it gives the error 'Property "followerHost" was not found in "MiNote". Make sure your query is correct. it's really annoying because if this worked it would help a lot with stopping deliver attempts to dead instances
(DIR) Post #Ab1txdVUuQpnq0q5Hk by efertone@slippy.xyz
2023-10-22T13:29:44.397Z
1 likes, 0 repeats
@emma@niscii.xyz I assume yes. They removed createdAt from notes too :/