python-memcached icon indicating copy to clipboard operation
python-memcached copied to clipboard

Delete and Delete_multi not working

Open akhalil-xiq opened this issue 6 years ago • 1 comments

When I tried to delete three keys in loop, it only deletes first and the following are not deleted. On the other hand, when I tried to use delete_multi(), it returns 0 always. I don't know the issue. Here is a code: `mc = Client([remote server IP]) for key in [digest_key, launchPadCompanies_key, heatmap_key]: logger.info('Delete Res: ' + str(mc.delete(key)))

#     count = 0
#     while count < 3:
#     res = mc.delete_multi([digest_key, launchPadCompanies_key, heatmap_key])
#     if res == 1:
#         logger.info('Success Response: ' + str(count) + "-" + str(res))
#         break
#     logger.info('Fail Response: ' + str(count) + "-" + str(res))
#     count += 1

` @alex @timgraham @jerith @linsomniac

akhalil-xiq avatar Nov 11 '19 14:11 akhalil-xiq

I found that it was due to socket_timeout. As the default is 3 sec, I changed it to 10 sec and it works fine. Can you explain it to me? when I set/get on default time it works fine but on deletes, it does not. @linsomniac @alex

akhalil-xiq avatar Nov 13 '19 10:11 akhalil-xiq