Skip to content

Get rid of $date syntax in JSON documents in account._sync_status #775

@squeaky-pl

Description

@squeaky-pl

See also #771

This syntax is not human readable as an artifact of reliance pymongo's extended json capabilities. It's only used in this single column. The tables in all the clusters are very small (~80MB) so I don't see a problem with rewriting this data.

Steps:

  1. Adapt CRM side code that parses $date, to also accept normal ISO serialization of datetimes, like we do everywhere else. We currently ingest this data to CRM through sync-engine's API to calculate account status and delays.
  2. Ship a change to sync-engine that uses ISO datetimes instead of $date
  3. Run a script to convert all the data in sync-engine
  4. Remove inbox/sqlalchemy_ext/json_util.py and just use stdlib's json module
  5. Drop support for $date from CRM side

sync-engine/inbox/models/account.py

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