Skip to content

Last import time is updated even if previous import failed #55

@jar398

Description

@jar398

In Publishing / Repository classes, rake sync task:
On a failed import (e.g. if the URL in secrets.yml is incorrect), a new ImportRun record is created, even if no resources/terms got imported. So, because the last-import time gets updated, a subsequent retry with a repair (e.g. a corrected secrets.yml) does nothing.
I think the correct behavior would be to keep track of whether an error occurred (e.g. in the rescue around the HTTP GET) and, if so, don't update the import time. Alternatively, keep track of whether anything got updated, and don't update the import time if nothing got updated - that option may be more robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions