When multiple transcodes start at the same time, the random int method is returning the same value for multiple directories when concurrency is set higher than 1 in the celery script. Currently it fails because it detects the folder already exists from another worker and halts transcoding. Would adding the current milliseconds to the string help? Something like
return TRANSCODER_TEMP_DIR + '_' + str(round(time.time() * 1000)) + '_' + str(random.randint(10000000, 99999999))
folder examples it creates are:
whatup.celery.9758_1.50315276795e+12_88760908
and
whatup.celery.9758_1.50315276602e+12_88760908
When multiple transcodes start at the same time, the random int method is returning the same value for multiple directories when concurrency is set higher than 1 in the celery script. Currently it fails because it detects the folder already exists from another worker and halts transcoding. Would adding the current milliseconds to the string help? Something like
return TRANSCODER_TEMP_DIR + '_' + str(round(time.time() * 1000)) + '_' + str(random.randint(10000000, 99999999))
folder examples it creates are:
whatup.celery.9758_1.50315276795e+12_88760908
andwhatup.celery.9758_1.50315276602e+12_88760908