-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script to populate relay with events, fix nip-27 compatibility #8
base: master
Are you sure you want to change the base?
Conversation
cmd/seeder/fetcher.go
Outdated
} | ||
f.outputRelays = append(f.outputRelays, relay) | ||
} | ||
log.Println(fmt.Sprintf("Established %v conns to %v", threads, output)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Printf?
…ing existence of event links in db
763242d
to
79e5d60
Compare
e3157d6
to
9153bdf
Compare
|
||
imgbb "github.com/JohnNON/ImgBB" | ||
"github.com/davidbyttow/govips/v2/vips" | ||
"github.com/pkg/errors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not needed anymore :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls check the figma of the home page (with the post feed) and try to generate all the information thats required there;
because what u generated is not enough;
also generate some videos as well; short ones <60s
Sample call: | ||
```bash | ||
sudo apt-get install -y libvips-dev # dynamic linking | ||
seeder --relays=wss://relay.damus.io/ --outputRelay=wss://localhost:9998 --profilesCount=1000 --threads=100 --perUser=100 --uploadKey=... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name the cmd subzero-seeder
} | ||
) | ||
|
||
const concurrentReqs = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it cpu dependant; and make it work optimally so we seed as fast as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not about CPu its about notices from the relay where we fetch data from
"github.com/pkg/errors" | ||
) | ||
|
||
var images []string = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omg, no! If u cant download any file dynamically, use some api/lib to generate files.
Everything needs to be dynamic
@@ -362,7 +362,7 @@ func validateKindProfileMetadataEvent(e *Event) error { | |||
} | |||
|
|||
func validateKindTextNoteEvent(e *Event) error { | |||
if json.Valid([]byte(e.Content)) { | |||
if strings.HasPrefix(e.Content, "{") && strings.HasSuffix(e.Content, "}") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? Why would it be JSON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue here that 49
for example is a valid JSON, json is not only objects, but primitives also, it should be some kind of check isJSONObject(). If that's not ok, we can try to unmarshal it with map[string]any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then this change makes it worse; it makes all of them be JSON objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find a better way to validate it properly for all cases
No description provided.