remove test stuff
This commit is contained in:
parent
be8b787c52
commit
dbc89e5b95
1 changed files with 0 additions and 41 deletions
41
main.go
41
main.go
|
@ -139,47 +139,6 @@ func main() {
|
|||
log.Fatalf("failed to create client: %v", err)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// file, err := os.Open("posts.json")
|
||||
// if err != nil {
|
||||
// fmt.Printf("Error opening file: %v\n", err)
|
||||
// return
|
||||
// }
|
||||
// defer file.Close()
|
||||
// byteValue, err := io.ReadAll(file)
|
||||
// if err != nil {
|
||||
// fmt.Printf("Error reading file: %v\n", err)
|
||||
// return
|
||||
// }
|
||||
|
||||
// var posts = struct {
|
||||
// Records []struct {
|
||||
// URI string `json:"uri"`
|
||||
// CID string `json:"cid"`
|
||||
// Value *bsky.Post `json:"value"`
|
||||
// } `json:"records"`
|
||||
// }{}
|
||||
|
||||
// // 4. Unmarshal (decode) the JSON data into the struct
|
||||
// err = json.Unmarshal(byteValue, &posts)
|
||||
// if err != nil {
|
||||
// fmt.Printf("Error unmarshaling JSON: %v\n", err)
|
||||
// return
|
||||
// }
|
||||
// for _, post := range posts.Records {
|
||||
// log.Printf("post: %s\n", post.Value.ProcessFacets(h.bsky.Bluesky.FetchAliases()))
|
||||
// s, _ := json.Marshal(post.Value)
|
||||
// h.ProcessPost(&models.Event{Did: bskyClient.Bluesky.Cfg.DID, Commit: &models.Commit{
|
||||
// Record: s,
|
||||
// RKey: strings.Split(post.URI, "/")[4],
|
||||
// CID: post.CID,
|
||||
// Collection: "app.bsky.feed.post",
|
||||
// }})
|
||||
// time.Sleep(time.Second * 2)
|
||||
// }
|
||||
// return
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
cursor := time.Now().UnixMicro()
|
||||
restartCount := 0
|
||||
loop:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue