workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
we use celery in a lot of our other apps so it was to remain consistent.
2017-12-20T17:44:14.000432
Johana
pythondev_help_Johana_2017-12-20T17:44:14.000432
1,513,791,854.000432
105,503
pythondev
help
i was the outlier using RQ.
2017-12-20T17:44:22.000364
Johana
pythondev_help_Johana_2017-12-20T17:44:22.000364
1,513,791,862.000364
105,504
pythondev
help
ah. are there benefits to using RQ?
2017-12-20T17:44:47.000030
Bruno
pythondev_help_Bruno_2017-12-20T17:44:47.000030
1,513,791,887.00003
105,505
pythondev
help
it’s “simpler”.
2017-12-20T17:45:10.000423
Johana
pythondev_help_Johana_2017-12-20T17:45:10.000423
1,513,791,910.000423
105,506
pythondev
help
would it do what I need in your opinion based on what I described?
2017-12-20T17:45:40.000123
Bruno
pythondev_help_Bruno_2017-12-20T17:45:40.000123
1,513,791,940.000123
105,507
pythondev
help
celery is often touted as having a large learning curve. that’s why i avoided it. but after working with it it isn’t all that bad.
2017-12-20T17:45:47.000257
Johana
pythondev_help_Johana_2017-12-20T17:45:47.000257
1,513,791,947.000257
105,508
pythondev
help
ok
2017-12-20T17:46:01.000379
Bruno
pythondev_help_Bruno_2017-12-20T17:46:01.000379
1,513,791,961.000379
105,509
pythondev
help
yea, i don’t see why not. you may need to do a quick spike to see what you like best.
2017-12-20T17:46:24.000106
Johana
pythondev_help_Johana_2017-12-20T17:46:24.000106
1,513,791,984.000106
105,510
pythondev
help
yea.
2017-12-20T17:46:35.000171
Bruno
pythondev_help_Bruno_2017-12-20T17:46:35.000171
1,513,791,995.000171
105,511
pythondev
help
so how is celery "distributed" ? looking at their page.
2017-12-20T17:46:49.000160
Bruno
pythondev_help_Bruno_2017-12-20T17:46:49.000160
1,513,792,009.00016
105,512
pythondev
help
so you can have multiple instances replicating each others queues?
2017-12-20T17:47:04.000225
Bruno
pythondev_help_Bruno_2017-12-20T17:47:04.000225
1,513,792,024.000225
105,513
pythondev
help
mostly, the threads that run and to the processes are long running and take time.
2017-12-20T17:47:37.000037
Bruno
pythondev_help_Bruno_2017-12-20T17:47:37.000037
1,513,792,057.000037
105,514
pythondev
help
the workers are distributing the work and you can distribute the workers among any number of machines. they all know how to talk to each other b/c of the broker.
2017-12-20T17:48:05.000211
Johana
pythondev_help_Johana_2017-12-20T17:48:05.000211
1,513,792,085.000211
105,515
pythondev
help
a larger process takes about 10 minutes. some times more. it takes about 10 hours to run them for all clients. and its done daily
2017-12-20T17:48:15.000213
Bruno
pythondev_help_Bruno_2017-12-20T17:48:15.000213
1,513,792,095.000213
105,516
pythondev
help
ah ok. you cant do that with RQ?
2017-12-20T17:48:31.000512
Bruno
pythondev_help_Bruno_2017-12-20T17:48:31.000512
1,513,792,111.000512
105,517
pythondev
help
or as easily?
2017-12-20T17:48:47.000213
Bruno
pythondev_help_Bruno_2017-12-20T17:48:47.000213
1,513,792,127.000213
105,518
pythondev
help
not sure really. i haven’t used RQ to that capacity but i would assume so b/c all the workers need is a copy of the source code they can access.
2017-12-20T17:48:57.000347
Johana
pythondev_help_Johana_2017-12-20T17:48:57.000347
1,513,792,137.000347
105,519
pythondev
help
the same goes for celery
2017-12-20T17:49:13.000342
Johana
pythondev_help_Johana_2017-12-20T17:49:13.000342
1,513,792,153.000342
105,520
pythondev
help
yea. that was my thought
2017-12-20T17:50:24.000266
Bruno
pythondev_help_Bruno_2017-12-20T17:50:24.000266
1,513,792,224.000266
105,521
pythondev
help
i just spin up workers based on need or load. and they have thecode. and just look to see what work needs to be done.
2017-12-20T17:50:55.000097
Bruno
pythondev_help_Bruno_2017-12-20T17:50:55.000097
1,513,792,255.000097
105,522
pythondev
help
as long as they can all talk to the same broker it should work.
2017-12-20T17:50:58.000166
Johana
pythondev_help_Johana_2017-12-20T17:50:58.000166
1,513,792,258.000166
105,523
pythondev
help
what about failover. if the queue container breaks or fails. how is that handled?
2017-12-20T17:51:17.000070
Bruno
pythondev_help_Bruno_2017-12-20T17:51:17.000070
1,513,792,277.00007
105,524
pythondev
help
ok.
2017-12-20T17:51:23.000028
Bruno
pythondev_help_Bruno_2017-12-20T17:51:23.000028
1,513,792,283.000028
105,525
pythondev
help
you get a bunch of rabbitmq errors.
2017-12-20T17:51:38.000015
Johana
pythondev_help_Johana_2017-12-20T17:51:38.000015
1,513,792,298.000015
105,526
pythondev
help
ah, or i suppose what if the broker fails.
2017-12-20T17:51:41.000013
Bruno
pythondev_help_Bruno_2017-12-20T17:51:41.000013
1,513,792,301.000013
105,527
pythondev
help
ok.
2017-12-20T17:51:43.000309
Bruno
pythondev_help_Bruno_2017-12-20T17:51:43.000309
1,513,792,303.000309
105,528
pythondev
help
we want to prevent lost jobs
2017-12-20T17:51:53.000378
Bruno
pythondev_help_Bruno_2017-12-20T17:51:53.000378
1,513,792,313.000378
105,529
pythondev
help
well, we have to
2017-12-20T17:51:58.000081
Bruno
pythondev_help_Bruno_2017-12-20T17:51:58.000081
1,513,792,318.000081
105,530
pythondev
help
you can have celery retry a task a number of times.
2017-12-20T17:52:07.000408
Johana
pythondev_help_Johana_2017-12-20T17:52:07.000408
1,513,792,327.000408
105,531
pythondev
help
if it keeps failing you can setup a dead-mailbox or something like that.
2017-12-20T17:52:20.000216
Johana
pythondev_help_Johana_2017-12-20T17:52:20.000216
1,513,792,340.000216
105,532
pythondev
help
you can also have celery send an email.
2017-12-20T17:52:43.000233
Johana
pythondev_help_Johana_2017-12-20T17:52:43.000233
1,513,792,363.000233
105,533
pythondev
help
well, i mean if celery goes down. or, in this case, redis since its the backend store
2017-12-20T17:52:44.000010
Bruno
pythondev_help_Bruno_2017-12-20T17:52:44.000010
1,513,792,364.00001
105,534
pythondev
help
hmm
2017-12-20T17:53:04.000001
Bruno
pythondev_help_Bruno_2017-12-20T17:53:04.000001
1,513,792,384.000001
105,535
pythondev
help
i suppose if it goes down, we can re-run the main worker to rebuild the queue.
2017-12-20T17:53:27.000137
Bruno
pythondev_help_Bruno_2017-12-20T17:53:27.000137
1,513,792,407.000137
105,536
pythondev
help
o wait n/m dead-letter queue is rabbitmq specific.
2017-12-20T17:53:53.000373
Johana
pythondev_help_Johana_2017-12-20T17:53:53.000373
1,513,792,433.000373
105,537
pythondev
help
its a finite amount of work (that would get larger as we get more users) but its that they are long running.
2017-12-20T17:54:04.000120
Bruno
pythondev_help_Bruno_2017-12-20T17:54:04.000120
1,513,792,444.00012
105,538
pythondev
help
i got you. celery has what are known as signatures, chains, and groups, you can use these to execute your tasks in particular ways.
2017-12-20T17:55:09.000334
Johana
pythondev_help_Johana_2017-12-20T17:55:09.000334
1,513,792,509.000334
105,539
pythondev
help
a chain for example will execute tasks in order and only when the first one completes.
2017-12-20T17:55:28.000463
Johana
pythondev_help_Johana_2017-12-20T17:55:28.000463
1,513,792,528.000463
105,540
pythondev
help
ok. thats nice.
2017-12-20T17:56:02.000125
Bruno
pythondev_help_Bruno_2017-12-20T17:56:02.000125
1,513,792,562.000125
105,541
pythondev
help
for monitoring: <http://docs.celeryproject.org/en/latest/userguide/monitoring.html>
2017-12-20T17:56:42.000430
Johana
pythondev_help_Johana_2017-12-20T17:56:42.000430
1,513,792,602.00043
105,542
pythondev
help
flower is pretty sweet.
2017-12-20T17:56:54.000239
Johana
pythondev_help_Johana_2017-12-20T17:56:54.000239
1,513,792,614.000239
105,543
pythondev
help
but what im thinking about. is the storage of the queue. in redis. what if redis goes down. For this case i would assume that the redis data has to be persisted onto a data volume or s3? or something. so if it goes down it can be restarted and get the data back. or we could possibly re-build the queue
2017-12-20T17:57:14.000190
Bruno
pythondev_help_Bruno_2017-12-20T17:57:14.000190
1,513,792,634.00019
105,544
pythondev
help
ok ill check it out thanks.
2017-12-20T17:57:25.000281
Bruno
pythondev_help_Bruno_2017-12-20T17:57:25.000281
1,513,792,645.000281
105,545
pythondev
help
yea, you would need to run a persistent redis.
2017-12-20T17:57:45.000059
Johana
pythondev_help_Johana_2017-12-20T17:57:45.000059
1,513,792,665.000059
105,546
pythondev
help
i just havent done this much yet for deploying all this.
2017-12-20T17:57:49.000196
Bruno
pythondev_help_Bruno_2017-12-20T17:57:49.000196
1,513,792,669.000196
105,547
pythondev
help
would it save data to s3 or just a mounted volume or something?
2017-12-20T17:58:16.000301
Bruno
pythondev_help_Bruno_2017-12-20T17:58:16.000301
1,513,792,696.000301
105,548
pythondev
help
i think redis has its own thing
2017-12-20T17:58:54.000300
Johana
pythondev_help_Johana_2017-12-20T17:58:54.000300
1,513,792,734.0003
105,549
pythondev
help
were not using docker yet. well we are but only for a small service. im onw of the few that is trying to help and bring docker in by getting small things running in it.
2017-12-20T17:59:02.000558
Bruno
pythondev_help_Bruno_2017-12-20T17:59:02.000558
1,513,792,742.000558
105,550
pythondev
help
ok.
2017-12-20T17:59:06.000437
Bruno
pythondev_help_Bruno_2017-12-20T17:59:06.000437
1,513,792,746.000437
105,551
pythondev
help
yea it’s called RDB. <https://redis.io/topics/persistence>
2017-12-20T17:59:19.000071
Johana
pythondev_help_Johana_2017-12-20T17:59:19.000071
1,513,792,759.000071
105,552
pythondev
help
ok. basically we cant afford to lose data.
2017-12-20T17:59:44.000421
Bruno
pythondev_help_Bruno_2017-12-20T17:59:44.000421
1,513,792,784.000421
105,553
pythondev
help
yea, says the RDB can be stored on amazon s3
2017-12-20T18:00:02.000586
Johana
pythondev_help_Johana_2017-12-20T18:00:02.000586
1,513,792,802.000586
105,554
pythondev
help
this is all done every day. so backup would only need to be done for the current or last day.
2017-12-20T18:00:22.000037
Bruno
pythondev_help_Bruno_2017-12-20T18:00:22.000037
1,513,792,822.000037
105,555
pythondev
help
main thing, is if it fails for whatever reason. when we bring it up we want to continue from where we left off.
2017-12-20T18:00:53.000152
Bruno
pythondev_help_Bruno_2017-12-20T18:00:53.000152
1,513,792,853.000152
105,556
pythondev
help
&gt; RDB is NOT good if you need to minimize the chance of data loss in case Redis stops working (for example after a power outage)
2017-12-20T18:01:10.000087
Bruno
pythondev_help_Bruno_2017-12-20T18:01:10.000087
1,513,792,870.000087
105,557
pythondev
help
what we store in redis shouldnt be too large.
2017-12-20T18:01:47.000292
Bruno
pythondev_help_Bruno_2017-12-20T18:01:47.000292
1,513,792,907.000292
105,558
pythondev
help
ok, i think the AoF part is more what im looking for.
2017-12-20T18:03:36.000012
Bruno
pythondev_help_Bruno_2017-12-20T18:03:36.000012
1,513,793,016.000012
105,559
pythondev
help
is the current thing not working well?
2017-12-20T18:04:04.000235
Johana
pythondev_help_Johana_2017-12-20T18:04:04.000235
1,513,793,044.000235
105,560
pythondev
help
but, it may not be too big of a deal. the list of all work can be built in a couple minutes probably. so if redis goes down. we can probably just rebuild it.
2017-12-20T18:04:47.000351
Bruno
pythondev_help_Bruno_2017-12-20T18:04:47.000351
1,513,793,087.000351
105,561
pythondev
help
it is working, but its really messy. its basically a small monolith.
2017-12-20T18:05:07.000291
Bruno
pythondev_help_Bruno_2017-12-20T18:05:07.000291
1,513,793,107.000291
105,562
pythondev
help
its all done in 1 big thread managed in code. and spawns process threads (up to 10) to actually process the work. and its hard to debug. and right now, im debugging a race condition.
2017-12-20T18:05:57.000138
Bruno
pythondev_help_Bruno_2017-12-20T18:05:57.000138
1,513,793,157.000138
105,563
pythondev
help
so when we have clients thats using this to monitor $1b worth of work reports, we want ti to be stable and easy to work on.
2017-12-20T18:07:49.000317
Bruno
pythondev_help_Bruno_2017-12-20T18:07:49.000317
1,513,793,269.000317
105,564
pythondev
help
I have a module with a `def main():` block i’m trying to call this module from another file using the context trick (<https://github.com/kennethreitz/samplemod/blob/master/tests/context.py>) in my tests folder i’m trying to say module.main() and it’s telling me it’s not callable. any pointers?
2017-12-20T19:52:03.000319
Marlon
pythondev_help_Marlon_2017-12-20T19:52:03.000319
1,513,799,523.000319
105,565
pythondev
help
Hey guys im attempting to setup a notification system for reddit. It works fine, however in attempting to upgrade I want to enable multiple users with multiple search terms and key words. What is the bets method to use in a database approach to add item searches to users? I'm just having trouble figuring out if someone...
2017-12-20T20:57:25.000244
Myong
pythondev_help_Myong_2017-12-20T20:57:25.000244
1,513,803,445.000244
105,566
pythondev
help
Would something like a many to many relationship be a good idea between a user and an item?
2017-12-20T20:59:55.000036
Myong
pythondev_help_Myong_2017-12-20T20:59:55.000036
1,513,803,595.000036
105,567
pythondev
help
many to many seems find to me
2017-12-21T02:47:56.000090
Ciera
pythondev_help_Ciera_2017-12-21T02:47:56.000090
1,513,824,476.00009
105,568
pythondev
help
but I'm no expert
2017-12-21T02:48:04.000012
Ciera
pythondev_help_Ciera_2017-12-21T02:48:04.000012
1,513,824,484.000012
105,569
pythondev
help
Hi, I have a list of boilerplate strings (to be contained in a file) and when a new message comes in, I have to check if this message contains any of the boilerplate strings and replace with ( "" ). The file containing the boilerplate string will change as new ones will be added. How best do I do this search to be eff...
2017-12-21T04:31:44.000158
Daniell
pythondev_help_Daniell_2017-12-21T04:31:44.000158
1,513,830,704.000158
105,570
pythondev
help
it depends how many boilerplate strings you want to test
2017-12-21T04:38:14.000045
Ciera
pythondev_help_Ciera_2017-12-21T04:38:14.000045
1,513,831,094.000045
105,571
pythondev
help
I'm looking at something over 400 lines
2017-12-21T04:57:19.000220
Daniell
pythondev_help_Daniell_2017-12-21T04:57:19.000220
1,513,832,239.00022
105,572
pythondev
help
Each string can have 100 characters
2017-12-21T04:57:36.000159
Daniell
pythondev_help_Daniell_2017-12-21T04:57:36.000159
1,513,832,256.000159
105,573
pythondev
help
Quick one, I am looking to replace WK30 in this str() ```&lt;a data-mmblock="WK30-NewIn" href="/Womens-Clothing/New-In?mmid=MM-_-WK30_NEWIN"&gt;``` but the week will change each week, so I'm not sure how i can search for WKXX, any ideas?
2017-12-21T09:27:34.000149
Krysta
pythondev_help_Krysta_2017-12-21T09:27:34.000149
1,513,848,454.000149
105,574
pythondev
help
Regex?
2017-12-21T09:29:53.000661
Corrinne
pythondev_help_Corrinne_2017-12-21T09:29:53.000661
1,513,848,593.000661
105,575
pythondev
help
Will be easy if the string is always formatted in the same way
2017-12-21T09:30:56.000596
Corrinne
pythondev_help_Corrinne_2017-12-21T09:30:56.000596
1,513,848,656.000596
105,576
pythondev
help
you can find the index of `WK` in the string and replace that and the 2 next letters
2017-12-21T09:30:59.000083
Ciera
pythondev_help_Ciera_2017-12-21T09:30:59.000083
1,513,848,659.000083
105,577
pythondev
help
`/(WK\d\d)/`
2017-12-21T09:31:06.000482
Ozie
pythondev_help_Ozie_2017-12-21T09:31:06.000482
1,513,848,666.000482
105,578
pythondev
help
but yeah regex :thumbsup:
2017-12-21T09:31:08.000274
Ciera
pythondev_help_Ciera_2017-12-21T09:31:08.000274
1,513,848,668.000274
105,579
pythondev
help
Great thanks guys!
2017-12-21T09:31:28.000124
Krysta
pythondev_help_Krysta_2017-12-21T09:31:28.000124
1,513,848,688.000124
105,580
pythondev
help
My fav tool: <https://regex101.com/>
2017-12-21T09:31:51.000399
Corrinne
pythondev_help_Corrinne_2017-12-21T09:31:51.000399
1,513,848,711.000399
105,581
pythondev
help
I was able to make progress on my holiday project! I need help with writing a readme and naming the thing
2017-12-21T09:36:36.000313
Marlon
pythondev_help_Marlon_2017-12-21T09:36:36.000313
1,513,848,996.000313
105,582
pythondev
help
I would also love to publish on PyPi, as an example, but I'm afraid everyone will laugh at my bad code
2017-12-21T09:37:33.000476
Marlon
pythondev_help_Marlon_2017-12-21T09:37:33.000476
1,513,849,053.000476
105,583
pythondev
help
Works wonders thanks guys
2017-12-21T09:38:58.000277
Krysta
pythondev_help_Krysta_2017-12-21T09:38:58.000277
1,513,849,138.000277
105,584
pythondev
help
<@Marlon> don't be afraid of that. You will probably laugh at your own code a few years/month from now.
2017-12-21T09:41:56.000450
Ciera
pythondev_help_Ciera_2017-12-21T09:41:56.000450
1,513,849,316.00045
105,585
pythondev
help
it means you have improved
2017-12-21T09:42:08.000398
Ciera
pythondev_help_Ciera_2017-12-21T09:42:08.000398
1,513,849,328.000398
105,586
pythondev
help
just remember to use the testing pypy while your are trying stuff :slightly_smiling_face:
2017-12-21T09:43:15.000244
Ciera
pythondev_help_Ciera_2017-12-21T09:43:15.000244
1,513,849,395.000244
105,587
pythondev
help
Ha, i’ve been laughing at my code for years
2017-12-21T09:43:36.000330
Marlon
pythondev_help_Marlon_2017-12-21T09:43:36.000330
1,513,849,416.00033
105,588
pythondev
help
i guess that means i’m learning
2017-12-21T09:43:43.000183
Marlon
pythondev_help_Marlon_2017-12-21T09:43:43.000183
1,513,849,423.000183
105,589
pythondev
help
so the project takes a jinja template, and an yaml input file and uses the values from the input file to template out the yaml file. it will also allow undefined variables, and reading from environment. i took a lot of inspiration from `envtpl` and `jinja2cli`
2017-12-21T09:47:41.000385
Marlon
pythondev_help_Marlon_2017-12-21T09:47:41.000385
1,513,849,661.000385
105,590
pythondev
help
is this a.) useful? anyone want to help me name it? i called it `jtpl`
2017-12-21T09:48:03.000299
Marlon
pythondev_help_Marlon_2017-12-21T09:48:03.000299
1,513,849,683.000299
105,591
pythondev
help
and i hate it
2017-12-21T09:48:05.000591
Marlon
pythondev_help_Marlon_2017-12-21T09:48:05.000591
1,513,849,685.000591
105,592
pythondev
help
well I suppose it's at least useful to you if you created it and it's always new stuff to learn
2017-12-21T09:50:11.000331
Ciera
pythondev_help_Ciera_2017-12-21T09:50:11.000331
1,513,849,811.000331
105,593
pythondev
help
I'm also very bad at naming things so can't hep you
2017-12-21T09:50:29.000764
Ciera
pythondev_help_Ciera_2017-12-21T09:50:29.000764
1,513,849,829.000764
105,594
pythondev
help
i share my code all the time. it’s not always at it’s best but at least i’ve shipped it!
2017-12-21T09:59:48.000605
Johana
pythondev_help_Johana_2017-12-21T09:59:48.000605
1,513,850,388.000605
105,595
pythondev
help
Hi guys I have studied about life time of local and global variables I had seen a few examples like if it's defined outside function block it's accessible only during the function execution if not it will be accessible throughout code execution my question here is how I can verify and visualize this any idea ?
2017-12-21T10:01:01.000745
Bette
pythondev_help_Bette_2017-12-21T10:01:01.000745
1,513,850,461.000745
105,596
pythondev
help
yajinja?
2017-12-21T10:01:49.000352
Johana
pythondev_help_Johana_2017-12-21T10:01:49.000352
1,513,850,509.000352
105,597
pythondev
help
yaml + jinja2 = yajinja
2017-12-21T10:02:06.000018
Johana
pythondev_help_Johana_2017-12-21T10:02:06.000018
1,513,850,526.000018
105,598
pythondev
help
yaninja ? :smile:
2017-12-21T10:02:18.000258
Ciera
pythondev_help_Ciera_2017-12-21T10:02:18.000258
1,513,850,538.000258
105,599
pythondev
help
i actually really like that
2017-12-21T10:02:23.000027
Marlon
pythondev_help_Marlon_2017-12-21T10:02:23.000027
1,513,850,543.000027
105,600
pythondev
help
:smiley:
2017-12-21T10:02:29.000755
Johana
pythondev_help_Johana_2017-12-21T10:02:29.000755
1,513,850,549.000755
105,601
pythondev
help
most of the other tools won’t do yaml either
2017-12-21T10:02:31.000406
Marlon
pythondev_help_Marlon_2017-12-21T10:02:31.000406
1,513,850,551.000406
105,602