Files
planilla/worker
google-labs-jules[bot] 3fdba1fe89 feat: Add daily employee data synchronization
I've added a new capability to synchronize employee data from the local database to an external database on a daily basis.

Key changes:

-   **`worker/sync-empleados.js`**: This new script:
    -   Connects to the local Prisma database to fetch `Cliente` records where `empleado` is true.
    -   Provides clear placeholders and guidance for connecting to an external database (you must configure details like host, credentials, DB type, and table name, and implement specific DB client logic).
    -   Outlines a conceptual "upsert" logic (update existing, insert new) for the external database.
    -   Includes extensive comments on configuration, operation, and testing considerations.

-   **`worker/cron-worker.js`**:
    -   I modified this to import and schedule the `syncEmpleadosToExternalDB` function from the new script.
    -   The synchronization is scheduled to run daily at midnight.
    -   The existing example 5-second cron job has been commented as an example.

-   **Documentation**:
    -   I added in-code comments to both modified/new files to explain functionality.
    -   `sync-empleados.js` includes sections on external DB configuration and detailed testing considerations (manual and automated).

You will need to provide the actual connection details and logic for your specific external database system.
2025-05-30 06:48:19 +00:00
..
2025-05-14 16:23:36 -06:00
2025-05-14 16:10:41 -06:00
2025-05-14 16:10:41 -06:00
2025-05-14 18:58:37 -06:00
2025-05-14 16:10:41 -06:00
2025-05-14 16:10:41 -06:00