maor

joined 1 year ago
[–] maor@lemmy.org.il 1 points 9 months ago

Oh thanks for the heads up, I should've read it more carefully :P

 

I recently stumbled upon a problem: I wanted the stdout of a command task to be printed after execution, so I toggled the global -v flag. However, the service module is apparently verbose as shit and printed like a 100 lines and uhh.... that's a costly tradeoff O_o

Seems like a PR for a task-level verbosity keyword has been proposed, yet rejected.

I'm aware it's possible to just register the stdout of the command and print it in a following debug task, but I wonder if there's a prettier solution.

How would you go about this? Ever encountered such a feeling?

[–] maor@lemmy.org.il 1 points 9 months ago* (last edited 9 months ago)

Based in Israel, don't get anything. This is standard as our contacts usually specify that a third of our salary is legally considered compensation for overtime.

There's no defined schedule, it's mostly "whoever is available will take care of the incident, and if multiple people are available then they should join too". It will obviously not go smoothly if you're never available. This is terrible, I wonder if there are any other places that behave like this.

It should be noted that this isn't weird considered the working hours are quite bad compared to the OECD, not terrible though.

[–] maor@lemmy.org.il 1 points 10 months ago* (last edited 10 months ago)

Okay, you may not gonna like it but I rented a 1TB storage box from Hetzner for 3 euros a month, just to get that foot off my neck. It's omega cheap and mountable via CIFS so life is good for now. I'm still interested in what I described in the OP, and I even started scribbling some Python, but I'm too scared of fucking anything up as of now.

The annoying part in writing that script was discovering that the filenames on disk don't match the filenames in the URLs. E.g., given this URL:
https://lemmy.org.il/pictrs/image/e6a0682b-d530-4ce8-9f9e-afa8e1b5f201.png. You'd expect that somewhere inside volumes/pictrs you'd find e6a0682b-d530-4ce8-9f9e-afa8e1b5f201.png, right...? So that's not how it works, the filenames are of the exact same format but they don't match.

So my plan was to find non-local posts from the post table, check whether the thumbnail_url column starts with lemmy.org.il (assuming that means my instance cached it), then finding the file by downloading it via the URL and scanning the pictrs directory for files that match the exact size in bytes of the downloaded files. Once found, compare their checksums to be sure it's the same one, then delete it and delete its post entry in the database.

When get close to 1TB I'll get back here for this idea... :P

[–] maor@lemmy.org.il 2 points 10 months ago

Haha I'm literally on it right now. My instance crashed a couple of hours ago because of it, so I emptied ~/.rustup to get some time, but idk how to go about it from here. LPP didn't do anything. That seems really curious, does literally everyone use S3?

[–] maor@lemmy.org.il 6 points 10 months ago (3 children)

Thanks a lot, I was looking for this exact kind of community. Posted there <3

[–] maor@lemmy.org.il 3 points 10 months ago

I should've mentioned it in the post, but I already tried deleting pics modified more than X days ago. The catch is that I don't wanna delete pics uploaded to my server, I just want to delete pocs cached from other instances :(

 
$ cd lemmy-dir
$ du -sh *
456K    lemmy-ui
15G     pictrs
4.3G    postgres

Guys this is no longer funny please I feel literally chased by the "no space left" message. Please help I don't need those pics I did not upload them

[–] maor@lemmy.org.il 2 points 10 months ago

Yep, I manage my servers and local machine with Ansible so I abstracted it with a role. This is indeed not that bad of a con because it's still plaintext so automation is easy, but it's still a minor issue ;)

[–] maor@lemmy.org.il 20 points 11 months ago (3 children)

Love me some systemd timers. Much more fun than cron.

  • Sane handling of environment variables with EnvironmentFile=
  • Out of the box logging. Especially useful is the ability to journalctl -f to watch long-running processes, which I'm not sure whether possible with cron
  • The ability to trigger the service manually rather than setting the timer to * * * * *, then forgetting it's supposed to run in a minute, get distracted, come back in 15 minutes

My only complaint is it's a bit verbose. I'd rather have it as an option inside the .service file. The .timer requires some boilerplate like [Unit].description (it... uh... triggers a service. that's the description), and WantedBy=timers.target. But these are small prices to pay

[–] maor@lemmy.org.il 4 points 11 months ago

Yessss I love how the algorithm here isn't tailored towards sucking me in

[–] maor@lemmy.org.il 1 points 11 months ago

It took me so much fucking time to realize how it works. There it is:

https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/

I learned Kubernetes in a hurry in my previous job, so I skimmed over lots of "obvious" things (in my manager's eye) and this was one of them:(

[–] maor@lemmy.org.il 1 points 11 months ago

I just rented a VPS from Hetzner because that's the workflow I'm already familiar with. Lowest tier, 5$, and since it's ARM it's also beefy enough to never need an upgrade I hope :P

[–] maor@lemmy.org.il 3 points 11 months ago
 

Y'all should try it! I loved seeing it popping on other instances' /instances page, and seeing it polling other communities. Also changing the background in my theme was lit.

Lemmy's hosting documentation is a bit rough around the edges, especially the ARM situation (and its contemporary solution), so I had some extra tinkering to do. No shade at all yeah? I appreciate every bit of their work and I jotted down some points that I need to consolidate into a documentation PR soon.

Anyway, I feel like the extra @... on our usernames should be worn as a badge of honor you feel me? ;)

view more: next ›