def METHOD_NAME(new_case, queue, progress):
    queue.append(new_case)
    if len(queue) >= 500:   # submit 500 cases at a time
        submit_case_blocks(queue, domain, user_id=user_id, device_id="explode_cases")
        progress += len(queue)
        if task:
            DownloadBase.set_progress(explode_case_task, progress, total_cases)
        del queue[:]
    return progress