[go-nuts] Re: Races in net/http when redirecting request - expected?

2019-03-05 Thread Paweł Szczur
> > wg := &sync.WaitGroup{} > for i := 0; i < 1000; i++ { > reader := &customReader{size: 90} > wg.Add(1) > go func(r *customReader) { > for { > req, err := http.NewRequest(http.MethodPut, "http://"+addr1+"/first";, r) > if err != nil { > fmt.Printf("%v", err) > } > req.GetBody = func() (io.Re

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-27 Thread Paweł Szczur
o Perillo wrote: > > On Friday, August 24, 2018 at 4:19:17 PM UTC+2, Paweł Szczur wrote: >> >> Thanks. Both things you mentioned are already fixed. The MakeDir may of >> course fail and now I handle it, but in described situation it was not an >> issue. >> The

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-27 Thread Paweł Szczur
No. On Friday, August 24, 2018 at 6:47:01 PM UTC+2, dja...@gmail.com wrote: > > Hi, > did you write files in /tmp on linux ? > (and there is daemon that clean old files in /tmp ?) > > Regards, > Djadala > > > -- You received this message because you are subscribed to the Google Groups "golang-n

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-24 Thread Paweł Szczur
Thanks. Both things you mentioned are already fixed. The MakeDir may of course fail and now I handle it, but in described situation it was not an issue. The files were written for most of the day successfully and suddenly they stopped to appear. The disk was and is not full. There was no error r

[go-nuts] os.WriteFile not writing files in long running process

2018-08-24 Thread Paweł Szczur
60sec.). It produces around 1700 files a day. Any ideas? I've found https://github.com/golang/go/issues/14491 and some other threads but not a conclusive result. Cheers, Paweł Szczur -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

[go-nuts] Re: How can I distribute incoming HTTP request to 5 asynchronous workers?

2017-01-31 Thread Paweł Szczur
I read whole request body. Pack to some structure. Send to a message queue (RabbitMQ, Kafka, Google Pub/Sub). MQ services allow to configure a topic/channel to multiplex a msg to all receivers (in PubSub you would create multiple subscriptions for a given topic https://cloud.google.com/pubsub/a