An instance was removed after the job was issued

Hi.
I’m sending all instances from Orthanc A to Orthanc B. Here is python code from Orthanc A:

def send_instances():
    try:
        print('send_instances start')
        instances = json.loads(orthanc.RestApiGet('/instances'))
        for instance_id in instances:
            orthanc.RestApiPost('/peers/second_local/store', json.dumps({
                "Resources": [instance_id],
                "Synchronous": True
            }))
            orthanc.RestApiDelete(f'/instances/{instance_id}')
        print('send_instances end')
    except Exception as e:
        print(e)


def OnChange(changeType, level, resource):
    if changeType == orthanc.ChangeType.ORTHANC_STARTED:
        send_instances()

But in the logs i can see this error for some of instances:
JOBS-WORKER-1 OrthancPeerStoreJob.cpp:89] An instance was removed after the job was issued: …

But those instances from the error exist in Orthanc B so they were successfully transferred. Can i be sure that all studies were transferred then? I don’t understand why that error was thrown.
I use orthancteam/orthanc:24.8.3

Hi,

You should check the FULL logs for other messages with the instance_id to understand your issue. The instance was maybe already in the destination before, it might have been deleted by someone else, …

If you think there is a bug in Orthanc, please provide us with a way to reproduce it.

Alain