File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ def update_location(uid, data):
150150 )
151151 g_hash = g_hash [0 ]
152152 # store the count in a g_hash
153- geo_fence_key = g_hash [:6 ]
153+ geo_fence_key = g_hash [:5 ]
154+ print (geo_fence_key , "artisan loc ghash" )
154155
155156 category = data ['job_category' ]
156157 cat_hash_key = f'{ category } +{ geo_fence_key } '
Original file line number Diff line number Diff line change @@ -60,8 +60,12 @@ def pbq(booking_details):
6060 # broadcast message to artisans using a redis pub/sub channel
6161 # the channel is unique to each artisan and its id is synonymous
6262 # to the artisan's geohash
63+ print (g_hash [0 ][:5 ], "customer loc ghash" )
6364
64- redis_2 .publish (g_hash [0 ][:6 ], str (booking_details ))
65+ # TODO: filter neighbouring points here to address boundary problem
66+ # and also properly cast to desired radius.
67+
68+ redis_2 .publish (g_hash [0 ][:5 ], str (booking_details ))
6569
6670
6771@huey .task ()
You can’t perform that action at this time.
0 commit comments