Oh.
Just when I thought I was on the brink of success ![]()
Oh.
Just when I thought I was on the brink of success ![]()
It’s running ![]()
I must admit, chatgpt helped me out. Needed to replace:
def parse_timestamp(timestamp)
Time.zone.at(@tz.utc_to_local(timestamp))
end
which is right at the bottom of the importer script
with:
def parse_timestamp(timestamp)
return nil if timestamp.nil? || timestamp.to_i == 0
# Convert integer → Time → Apply timezone → Convert to Rails Time.zone
utc_time = Time.at(timestamp.to_i).utc
local_time = @tz.utc_to_local(utc_time)
Time.zone.at(local_time)
end
…it’s chugging through the topics now, but I can see things appearing on the site. I will report back to (hopefully) say it’s a success afterwards. If it is, I might make another topic on here with a guide of what I did to get it all working.
It’s worked and is great. Thank you @Pfaffman for your assistance, it’s been much appreciated.
20 years worth of threads and posts now in discourse, with surprisingly little clean up to do - the script is great once you’ve got it running ![]()
To get the script running, I installed mariadb-server on the host. On the host I had to make sure firewall was open, mysql was listening on the correct port and the root user had permission to access from the remote host (the hsot vps) by updating it’s user privileges in mysql.
(all firewall and permissions locked back down afterwards)
I then, within the container, pointed the script to the host IP (docker default) and it all went fine from there…except the time thing, which I found a fix for, detailed here:
This is a quick run down of what I did, if anyone stumbles across this thread whilst trying to do the same and gets stuck, reach out and I will try to assist with anything I’ve learned over the last few days!
I’m so pleased I got it working, my initial estimate of a weekend was probably about right!
Great! I’m so glad you got it!