88cdc4f3c |
Tim Richardson |
2025-09-21T20:40:20+10:00 |
Merge branch 'master' into DAS-295
|
8391cd1a5 |
Tim Richardson |
2025-09-21T20:40:01+10:00 |
Update DearCachedAPI product availability refresh concurrency model and docstring; fix typo in sales cache update docstring (cached_dear app)
Fix three_pl_dermapen autofill logic: set TESTING env var default to False; correct ForeignKey field name from three_pl_fulfilment to three_pl_order_fulfilment in model and usage; minor formatting and comment fixes (three_pl_dermapen app)
|
267f56ebd |
Tim Richardson |
2025-09-21T16:24:46+10:00 |
Update cached_dear, three_pl_dermapen apps: - Remove obsolete migration 0027 in cached_dear. - In cached_dear.tasks_equipmed, change 3PL automation check to use "testing" flag instead of "active". - In three_pl_dermapen, add separate "testing" and "production" flags to dispatch config, replacing single "active" flag. - Add docstring for Dermapen auto-fill queue function. - Update dispatch config mappings to use new testing/production flags accordingly.
|
998c47ea0 |
Tim Richardson |
2025-09-21T16:08:35+10:00 |
Add optimistic concurrency control to cached_dear ProductAvailability updates
- Introduce centralized Redis lock keys and Valkey timestamp keys for ProductAvailability per-location updates in cached_dear.connector.dear_lock_keys.
- Refactor dear_cached_api.py to accumulate ProductAvailability create/update operations per location and commit them in a single atomic transaction under a short Redis lock.
- Use Valkey timestamp to detect and skip stale commits if a newer update has already been applied.
- Update hard allocation quantities within the same transaction, zeroing out non-observed allocations.
- Add detailed logging for lock acquisition, stale data detection, and commit results.
- Update documentation/locking.txt with example usage of optimistic cache update pattern using Redis locks and Valkey timestamps.
- Fix minor typo in aider_prompt.md.
Apps affected: cached_dear
|
c2e85f355 |
Tim Richardson |
2025-09-21T14:53:49+10:00 |
Remove the 'stale' field and related stale-row sweeping logic from the cached_dear app, including deletion of the sweep task and migration. Update all queries to no longer filter on 'stale=False' for ProductAvailability. Clean up imports and task scheduling in cached_dear.tasks_1300_tempfence. Remove unused lock key functions. Adjust code in multiple apps (cached_dear, dear_zoho_analytics, rest_api, shopify, three_pl, three_pl_aurora, three_pl_dermapen) to reflect removal of 'stale' filtering on ProductAvailability queries.
Apps affected: cached_dear, dear_zoho_analytics, rest_api, shopify, three_pl, three_pl_aurora, three_pl_dermapen
|
692c14dea |
Tim Richardson |
2025-09-21T13:39:15+10:00 |
Add exception handling for API_error in three_pl to log specific API errors in get_or_create_pick_from_fulfilment_guid; fix datetime usage in cached_dear tasks_status_anxiety.py by aliasing datetime module to dt.
Apps: cached_dear, three_pl
|
1691743dd |
Tim Richardson |
2025-09-20T10:34:08+10:00 |
commit cached_dear: Improve error logging in reauthorise_invoices and clarify get_sale docstring
- In cached_dear/connector/dear_additional_logic.py, enhanced error messages in reauthorise_invoices to include current Dear sale JSON from API for better diagnostics.
- Minor message formatting fix in authorise_first_draft_invoice error logging.
- In cached_dear/dear_api_base/dear_base.py, updated get_sale method docstring to specify it returns the Dear Sale object from the API.
|
a3eedaed1 |
Tim Richardson |
2025-09-19T18:00:14+10:00 |
three_pl_dermapen: Restrict process status update and reset actions to superusers only; update template and view permission checks accordingly.
|
1439550a1 |
Tim Richardson |
2025-09-19T16:01:32+10:00 |
Commit message:
```
three_pl_dermapen: Refactor autofill order variable naming and improve logging config
- In three_pl_dermapen app, renamed all occurrences of 'autofill_order_row' to 'auto_fill_order_row' for consistency.
- Made DearInstanceSettings lookup case-insensitive using __iexact.
- Enhanced DermapenAutoFillOrderStatus enum to properly handle notification levels with a class-level map.
- Added detailed DEBUG-level logging configuration to local_settings.py for local development.
- Updated tests to reflect variable name changes.
```
|
959c77624 |
Tim Richardson |
2025-09-19T12:49:51+10:00 |
three_pl_dermapen: Add new migration to add fulfilment_nbr and three_pl_fulfilment fields to DermapenAutoFillOrder; extend status max_length to 20 and update status choices mapping in model.
|
0e284be38 |
Tim Richardson |
2025-09-19T12:43:09+10:00 |
Add new auto-pick and 3PL fulfilment queueing steps to Dermapen auto-fill process
- Introduce AutoFillNotificationLevel enum for log/email/attribute notifications.
- Enhance DermapenAutoFillOrderStatus with PICKED and PICKING_FAILED states and notification levels.
- Add fulfilment_nbr and link to three_pl_fulfilment in DermapenAutoFillOrder model.
- Centralize error/status handling in handle_autofill_status_update_and_error_reporting().
- Implement auto_pick_order() to run auto-pick, update DermapenAutoFillOrder status, and handle errors.
- Implement prepare_and_queue_three_pl_fulfilment() to create/refresh 3PL fulfilment row and enqueue it for 3PL export.
- Refactor task_process_dermapen_autofill_queue to use new helpers for picking and 3PL queueing, improving clarity and error handling.
- Add tests for auto_pick_order and prepare_and_queue_three_pl_fulfilment steps.
App: three_pl_dermapen
|
67f7df62f |
Tim Richardson |
2025-09-19T00:04:11+10:00 |
Add error handling and testing improvements to three_pl_dermapen app
- Added JB_DISABLE_BUFFERING env var to pytest run config for three_pl_dermapen tests.
- In cached_dear app, fix ProductAvailability bulk_update to handle clearing stale flag without other field changes.
- In three_pl_dermapen business_logic/autofill_logic.py:
- Introduce AutoFillErrorType enum and centralized error handler function.
- Modify queue_dermapen_order_for_auto_fill_if_applicable to handle test monkeypatching.
- Rename and enhance task_process_dermapen_autofill_queue task:
- Accept optional row_ids to process specific orders.
- Skip lock acquisition in testing mode.
- Use DearCachedAPI instance reuse.
- Add API_error exception handling inside sale lock block.
- In three_pl_dermapen tests, update test_one_order_dev to uppercase keys in monkeypatch dicts and call task_process_dermapen_autofill_queue with row_ids param.
Apps affected: three_pl_dermapen, cached_dear
|
482e817a9 |
Tim Richardson |
2025-09-18T21:47:10+10:00 |
three_pl_dermapen: Add case-insensitive entity check, update test with dummy dispatch mapping for dev test
|
4ec63c597 |
Tim Richardson |
2025-09-18T17:10:47+10:00 |
cached_dear: Enhance DearCachedAPI with case-insensitive entity handling, type-safety for custom job logger, and Celery bootstrap robustness; add new test fixture for Dermapen auto-fill
|
d5d220ed6 |
Tim Richardson |
2025-09-18T16:20:00+10:00 |
Merge branch 'master' into DAS-295
# Conflicts:
# ansible/includes/version.yml
# dear_zoho_analytics/tasks.py
|
0c9266905 |
Tim Richardson |
2025-09-18T11:49:39+10:00 |
cached_dear: Make `stale` field nullable in ProductAvailability model and add index in migration
|
0708e4bc5 |
Tim Richardson |
2025-09-18T10:22:54+10:00 |
cached_dear: Improve date filtering for EffectiveDate in Shopify interentity processing
- Updated date range filtering in process_dear_sale_transaction to robustly parse and compare EffectiveDate as date objects instead of string comparison.
- Modified SQL JSONB date filter to cast EffectiveDate to date type for accurate date range filtering in create_intercompany_journals.
- These changes ensure correct handling of timestamps and date boundaries in transaction filtering.
|
0beb2cb4d |
Tim Richardson |
2025-09-18T09:15:10+10:00 |
commit dear_zoho_analytics: clean up imports and add no_simultaneous_execution_no_retry decorator to refresh_za_product_movements_all_history task
- Removed unused imports (hashlib, logging, random, json) from tasks.py
- Cleaned up import statements for better readability
- Added @no_simultaneous_execution_no_retry decorator to refresh_za_product_movements_all_history task to prevent concurrent execution
|
31eaa9cba |
Tim Richardson |
2025-09-18T09:11:51+10:00 |
Add deployment timestamp tracking from environment variable APP_VERSION_DEPLOYED_AT to project settings, ansible local_settings template, and core middleware. This timestamp is used by HeavyLoadBannerMiddleware to show a consistent "new-version" banner with the deploy time instead of current time. Apps affected: core, project, ansible (template)
|
67baa9637 |
Tim Richardson |
2025-09-18T08:21:57+10:00 |
three_pl_dermapen: Refactor autofill logic, improve 3PL dispatch config, and add feature flag for Hoxton auto-process
- Enhanced autofill logic to handle active 3-PL locations using `three_pl_dispatch_mapping`.
- Introduced `active` flag inside dispatch configuration for location-level enablement and error email configuration.
- Updated Hoxton auto-process flow with feature flag `USE_V2_AUTOPROCESS` for conditional execution.
- Added defensive error handling and testing mode guard to improve queueing and processing logic.
- Implemented dummy 3PL backend for testing purposes without contacting external APIs.
- Enhanced logging, error handling, and location-based processing safeguards for better reliability.
- Improved typing and modular configuration for dispatch settings, ensuring easier extensibility.
|
f69b1ba60 |
Tim Richardson |
2025-09-17T14:32:13+10:00 |
Update zoho_analytics_connector submodule to latest commit e1c334d
|
88e1dec02 |
Tim Richardson |
2025-09-17T14:07:15+10:00 |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# ansible/includes/version.yml
|
cbe0705ce |
Tim Richardson |
2025-09-17T13:47:54+10:00 |
commit core: skip banner injection on Django admin pages in HeavyLoadBannerMiddleware
- Added a check to avoid injecting banners on any request paths starting with "/admin" to prevent cluttering the Django admin interface.
- Added a guard in the new-version banner injection method to never show the banner while an update is pending.
|
b9ddc300e |
Tim Richardson |
2025-09-17T13:33:45+10:00 |
core, dear_zoho_analytics: - core/show_banners_middleware.py: Changed log level from INFO to DEBUG for Content-Type and non-HTML response messages; increased z-index values for heavy load, new version, and update pending banners to ensure proper overlay stacking. - dear_zoho_analytics/tasks.py: Added acks_late=False to refresh_za_product_movements_all_history task for early ACK to prevent message redelivery; added no_simultaneous_execution_no_retry decorator to enforce cluster-wide single execution.
|
104735e2b |
Tim Richardson |
2025-09-17T12:40:43+10:00 |
Commit message: three_pl_dermapen: Update autofill_logic to set process_status and reset file exchange fields on fulfilment rows
Summary:
In the three_pl_dermapen app, modified the process_dermapen_autofill_queue function in autofill_logic.py to assign ProcessStatus.QUEUED to newly prepared fulfilment rows and clear their file_exchange_status and latest_result fields before saving. This ensures fulfilment rows are properly queued for 3PL transmission.
|
54e3765da |
Tim Richardson |
2025-09-17T11:52:58+10:00 |
Add fulfilment row creation after pick creation in Dermapen autofill logic; add comment about task redundancy in Dermapen tasks
- In three_pl_dermapen, updated autofill_logic.py to create or refresh 3PL fulfilment row immediately after a pick is created, enabling immediate export to 3PL backend.
- Added error handling and logging around fulfilment row preparation.
- In tasks.py, added a comment noting that the task_dermapen_autopick_by_channel task will become redundant due to upcoming new auto fulfilment logic.
|
4ad497c52 |
Tim Richardson |
2025-09-17T11:34:03+10:00 |
Update three_pl_dermapen autofill_logic to process DermapenAutoFillOrders grouped by location with location-level locking. - Group pending orders by location and acquire a location lock before processing all orders for that location. - For each order, acquire a sale-level lock and attempt auto-pick with updated AutoPickSolutionFinder parameters. - Handle lock acquisition failures by postponing orders without marking as error. - Improve logging and status updates for processed, skipped, postponed, and error orders. - Remove redundant fetching and processing per order; optimize with batch location processing.
App: three_pl_dermapen
|
f5423fef1 |
Tim Richardson |
2025-09-17T11:14:27+10:00 |
Update product availability cache method in cached_dear app to use mark-then-upsert strategy with stale flag for concurrency; add detailed docstring explaining concurrency model, query contract, and parameters.
|
565ed8fca |
Tim Richardson |
2025-09-17T10:29:21+10:00 |
Add stale flag to ProductAvailability model and implement mark-then-sweep refresh logic in cached_dear app
- Add a new BooleanField 'stale' to ProductAvailability model to mark rows not refreshed in the latest update.
- Modify update_product_availability_v2 to mark all rows for a location as stale before refresh, clear stale flag on updated/created rows, and remove immediate deletion of obsolete rows.
- Add sweep_stale_product_availability method in DearCachedAPI to delete rows still marked stale, guarded by a Redis lock.
- Create a new periodic Celery task (task_sweep_product_availability_stale_rows) to run the sweeper every 5 minutes for all active Dear instances.
- Update all queries on ProductAvailability to filter out stale=True rows to avoid using obsolete data.
- Fix minor typos and improve code style in cached_dear/connector/dear_cached_api.py.
- Add consistent lock key function for location fulfilment in cached_dear/connector/dear_lock_keys.py.
- Update imports and task scheduling in cached_dear/tasks_1300_tempfence.py to use task objects.
- Update various business logic and integration modules (three_pl, shopify, dear_zoho_analytics, rest_api) to exclude stale ProductAvailability rows.
- Add migration 0026_productavailability_stale.py to add the stale field to the database.
Apps affected: cached_dear, rest_api, dear_zoho_analytics, shopify, three_pl, three_pl_aurora
|
4c0ce59a0 |
Tim Richardson |
2025-09-17T08:26:22+10:00 |
Merge branch 'master' into DAS-295
|
214f4985b |
Tim Richardson |
2025-09-17T08:25:55+10:00 |
core: Increase log visibility by changing debug messages to console.log in job_log_websocket.js and add heartbeat receipt log message
|
b710ebddc |
Tim Richardson |
2025-09-17T08:23:13+10:00 |
Commit message:
core: Promote heartbeat debug logs to info level for better visibility in production
- In core/celery_signals.py, changed heartbeat hook logging from debug to info to ensure visibility of task heartbeat start events and duplicate heartbeat warnings in production.
- In core/common_files/job_heartbeat.py, added info-level log when a heartbeat is published for a job.
|
95a384aab |
Tim Richardson |
2025-09-17T08:07:15+10:00 |
Add per-task heartbeat support to core app to emit periodic heartbeat messages during Celery task execution. - Moved websocket_helper_voga_job_log.js from cin7_sync to core static files. - Added core/common_files/job_heartbeat.py to start/stop heartbeat threads or greenlets emitting heartbeat messages every minute. - Updated core/celery_signals.py to start and stop heartbeat workers on task_prerun and task_postrun signals, restricted to allowed hostnames. - Extended Cin7SyncJobLogPublisher in core/models.py with publish_heartbeat() method to send heartbeat messages via Redis. - Enhanced core/static/core/js/job_log_websocket.js to handle heartbeat messages, track job state (PENDING, RUNNING, STALLED, EXITED), and update UI accordingly.
Apps affected: core, cin7_sync (only file moved out, no code changes)
|
4e6008d99 |
Tim Richardson |
2025-09-17T07:41:51+10:00 |
core, three_pl: Add migrations altering status fields in OutboundWebhookTask and ThreeplOrderFulfilments models respectively
|
3104b6ea9 |
Tim Richardson |
2025-09-16T21:51:52+10:00 |
Add Dermapen auto-fill queue and processing logic with tests
- Add DermapenAutoFillOrder model and status TESTING to track orders queued for auto-fill.
- Implement queue_dermapen_order_for_auto_fill_if_applicable() to enqueue eligible Dermapenworld orders based on location, RMA status, shipping country, and customer attribute.
- Add process_dermapen_autofill_queue Celery task to process queued orders, perform auto-picking, and create fulfilment rows.
- Move three_pl_dispatch_mapping and related settings to business_logic/definitions.py for reuse.
- Clean up redundant mapping in tasks.py and import from definitions.
- Add pytest tests for queuing logic and exclusion criteria.
- Add run configuration for pytest targeting the new test.
App affected: three_pl_dermapen
|
cf3546a27 |
Tim Richardson |
2025-09-16T19:18:30+10:00 |
Merge branch 'master' into DAS-295
|
8d1ccec61 |
Tim Richardson |
2025-09-16T19:16:33+10:00 |
Update cached_dear template link text; improve update-pending banner message in core middleware
- cached_dear: Changed "List Redis locks" link text to "List locks" in index.html for clarity.
- core: Enhanced the update-pending banner message in show_banners_middleware.py to better explain job behavior during application updates.
|
9ac79eb99 |
Tim Richardson |
2025-09-16T18:50:33+10:00 |
Commit message:
three_pl, three_pl_dermapen: Improve 3PL order status handling and Dear shipment processing
- three_pl: Add guard to prevent regression of ACCEPTED status in fulfilment_rows update logic.
- three_pl: Add new ProcessStatus SHIPPED_IN_DEAR.
- three_pl_dermapen: Rename variable for clarity in task_create_dear_shipments.
- three_pl_dermapen: In find_and_process_hexspoor_status_updates, upgrade PENDING_3PL to ACCEPTED when Hexspoor acknowledges order.
- three_pl_dermapen: Adjust file_exchange_status and process_status updates for shipped orders; clarify shipment posting is handled by separate task.
- three_pl_dermapen: Fix file_exchange_status value for PICK AND PACK status to "ORDER_SENT_APPROVAL_RETURNED".
|
39ae994df |
Tim Richardson |
2025-09-16T15:27:19+10:00 |
Merge branch 'master' into DAS-295
|
0ff5263d8 |
Tim Richardson |
2025-09-16T14:07:21+10:00 |
Add update-pending banner feature to core app and deployer helper in amazon_eks
- core: Add update_pending.py to track update-pending flag with TTL and ETA
- core: Add views_update.py with signal_update_pending API endpoint to set flag, protected by secret
- core: Modify heavy_load_middleware.py to inject update-pending banner in HTML responses when flag active
- core: Add URL route for signal-update-pending API
- project: Add UPDATE_PENDING_SECRET config and load from env vars or common-secret-env.values
- amazon_eks: Replace common-secret-env.yaml with common-secret-env.values and update kustomization.yaml accordingly
- amazon_eks/helpers/tui_deployer.py: Notify running pods of update pending by calling signal-update-pending API before deployment
- three_pl_dermapen: Add new template three_pl_ref_row_status.html (unrelated to update-pending feature)
|
8067d12fd |
haviz |
2025-09-16T10:56:30+07:00 |
Fix region validation
|
edd308e84 |
Tim Richardson |
2025-09-16T12:07:18+10:00 |
checkin
|
c4c119bb0 |
Tim Richardson |
2025-09-16T11:46:22+10:00 |
Update cached_dear and core apps:
- cached_dear: Refactor PurgeCeleryQueuesView to purge Celery queues directly via Redis/Sentinel client instead of using celery_app.control.purge. Added robust Redis key deletion logic and improved logging.
- core: Rename heavy_load.py to heavy_load_middleware.py and update HeavyLoadBannerMiddleware with UI improvements including a dismiss button and adjusted banner positioning.
- project: Update middleware path in settings.py to reflect core.heavy_load_middleware.HeavyLoadBannerMiddleware.
|
343f083f7 |
Tim Richardson |
2025-09-16T11:06:00+10:00 |
Update cached_dear: Improve handling of celery_app.control.purge return values in PurgeCeleryQueuesView to support both int and broadcast list responses; enhance success message with clearer details.
|
d6ceffb29 |
Tim Richardson |
2025-09-16T10:51:04+10:00 |
Add purge Celery queues view and link in cached_dear; increase pgbouncer replicas; update karpenter nodepool to block "large" instances; improve HeavyLoadBannerMiddleware JS to auto-remove banner after two zero queue depth checks.
Apps affected: cached_dear, core
|
1ed6e6d7b |
Tim Richardson |
2025-09-16T08:31:03+10:00 |
documentation notes for what needs to be done to change the AWS image registry.
|
6754535bb |
Tim Richardson |
2025-09-16T07:54:10+10:00 |
documentation notes for what needs to be done to change the AWS image registry.
|
8e55e8d4d |
Tim Richardson |
2025-09-15T23:07:42+10:00 |
commit: dear_zoho_analytics: zoho_backend - add global per-process throttle for Zoho API calls and reduce log spam
- Introduced a global per-process throttle to ensure at least 1 second spacing between any two Zoho API calls within the same worker process, using a threading.Lock and monotonic timestamps.
- Replaced the fixed 1-second sleep before every Zoho API call with a dynamic wait based on the last call time to better respect Zoho rate limits.
- Removed per-row deletion logging in ZohoAnalytics deletion to reduce excessive log spam and avoid additional throttling delays.
|
01db39fb7 |
Tim Richardson |
2025-09-15T22:44:32+10:00 |
core: Update base.html navbar container to use container-fluid and remove custom max-width styling; add flex-grow-1 to navbar-nav for layout adjustment
|
33cec00a9 |
Tim Richardson |
2025-09-15T22:35:27+10:00 |
Fix HTML title tag and add missing padding-right in CSS in core app's base.html template.
|
6e3441dee |
Tim Richardson |
2025-09-15T22:16:40+10:00 |
tasks: update error email recipients for Canton Tea
|
ce98ab288 |
Tim Richardson |
2025-09-15T21:33:54+10:00 |
core: fix navbar overflow and wrapping issues in base.html and main.css
- Moved CSS rules for navbar-nav.me-auto flex-wrap and overflow-x from main.css to inline style in base.html for better control.
- Re-enabled flex-wrap on .navbar-nav.me-auto at lg breakpoint to allow wrapping instead of overflow.
- Removed redundant overflow-x: auto on .navbar-collapse from main.css.
- Fixed malformed <title> tag in base.html.
|
e8bb5dd84 |
Tim Richardson |
2025-09-15T21:08:49+10:00 |
core: Improve navbar responsiveness and add celery queue all-clear alert email
- core/static/core/css/main.css: Added CSS rules to allow navbar menu wrapping on medium-large screens and horizontal scrolling on overflow, preventing menu spillover and ensuring link text doesn't break mid-word.
- core/templates/core/base.html: Changed navbar-expand-md to navbar-expand-lg for better navbar expansion breakpoint.
- core/tasks.py: Enhanced monitor_celery_queues task to send an "all-clear" email notification when all monitored Celery queues return below the alert threshold after a previous alert was sent, improving alert cycle handling. Added import for timezone.
|
28ee1b7f7 |
Tim Richardson |
2025-09-15T16:20:55+10:00 |
Commit message:
core: enhance celery task handling and improve celery queue depths template
- Update celery_queue_depths.html to show separate "Ready" and "Unacked" columns with formatted timestamps.
- In core/celery_signals.py, add task_postrun signal handler to clean up leftover gevent greenlets after each task, preventing tasks from hanging due to lingering greenlets.
- Add graceful fallback if gevent is not installed.
- Refactor skip_disabled_periodic_tasks to raise Ignore for disabled periodic tasks without extra comments.
|
cdfe1c14c |
Tim Richardson |
2025-09-15T13:06:16+10:00 |
Commit message:
core: Improve Redis DB parsing and queue depth measurement in Celery monitoring
- Robustly parse Redis DB number from broker URL path, handling extra slashes or segments and falling back to settings.
- Enhance Celery queue depth measurement to try multiple Redis key patterns for ready and unacked lists, improving accuracy and visibility of unacknowledged tasks.
dear_zoho_analytics: Add 1-second throttle delay between Zoho API deletion requests to avoid rate limits
documentation: Rename and update webhook inbound docs with note on authentication method referencing generic_webhook_handler
|
72b6184ca |
Tim Richardson |
2025-09-14T19:59:19+10:00 |
Merge remote-tracking branch 'origin/master'
|
01c1d2d55 |
Tim Richardson |
2025-09-14T16:50:57+10:00 |
Add new helper script in amazon_eks app to delete pods stuck in 'ContainerCreating' state
- Created `delete_container_creating.sh` to list and delete Kubernetes pods stuck in 'ContainerCreating' status
- Supports checking all namespaces or a specific namespace
- Includes user confirmation before deletion to prevent accidental pod removal
|
98230e512 |
Tim Richardson |
2025-09-14T13:11:33+10:00 |
Commit message: amazon_eks: Clear terminal on exit from TUI deployer
Summary:
Added a helper function to clear the terminal screen on exit from the TUI deployer, ensuring a clean prompt even after errors or interrupts. Wrapped the main curses TUI call in a try-finally block to invoke this terminal clear function on exit.
|
e54528ce2 |
Tim Richardson |
2025-09-14T13:10:22+10:00 |
Add Celery queue depth diagnostics and spam test in cached_dear app
- Add a new template cached_dear/celery_queue_depths.html to display Celery queue depths.
- Add links in cached_dear index.html menu for Celery queue depth view and spam test.
- Add CeleryQueueDepthsView and SpamCeleryQueueView in cached_dear/views_diagnostic.py for viewing queue depths and spamming main queue with dummy tasks.
- Add URL routes for these views in cached_dear/url_includes/urls_diagnostics.py.
- Add helper function get_celery_queue_depths in core/tasks.py to get Redis queue lengths.
- Add a simple 5-second sleep task sleep_test_5s in core/tasks.py used by spam view.
- Update amazon_eks/karpenter/ec2nodeclass.yaml to bump Amazon Linux 2023 AMI alias version.
Apps affected: cached_dear, core
|
cc6f8ea9e |
Tim Richardson |
2025-09-14T08:58:18+10:00 |
Add karpenter app: update EC2NodeClass AMI alias to "al2023@v20250818" with usage notes; add new inflate.yaml deployment manifest for inflate pod using pause image with resource requests and nodeSelector.
|
4f0307075 |
Tim Richardson |
2025-09-13T22:49:11+10:00 |
Update amazon_eks Karpenter configs: adjust EC2NodeClass AMI alias and volume size, add kubelet maxPods; increase nodepool consolidateAfter to 30m
|
d934f3517 |
Tim Richardson |
2025-09-13T13:19:37+10:00 |
commit cached_dear: Improve update logic and counting in tilecloud_shopify_interentity.py
- Refined logic to track whether an existing journal entry was actually updated.
- Updated counting of created and updated journal entries to reflect real changes.
- Added check to skip updates on fully posted journal entries while logging potential discrepancies.
- Ensured document_type changes trigger updates only when necessary.
|
ae40e565f |
Tim Richardson |
2025-09-13T13:19:29+10:00 |
Reduce CPU resource limits and requests for `django-api-sync-base` containers.
|
d4713c405 |
Tim Richardson |
2025-09-13T12:35:15+10:00 |
Reduce CPU and memory resource requests for pgbouncer and valkey pods; decrease pgbouncer replicas from 3 to 2. Enable SpotToSpotConsolidation feature gate in karpenter config and deployment. Lower gunicorn workers from 3 to 2 in supervisor config. In cached_dear app, remove void_discrepancies option and related voiding logic in reconcile_posted_journals_with_xero_report; instead, add logic to detect orphan journals in Xero not in DB and log warnings for manual investigation, and reset status flags for voided journals still in Xero to POSTED for reprocessing. Adjust related task and view to remove void_discrepancies parameter.
Apps affected: cached_dear
|
6e78cd340 |
Tim Richardson |
2025-09-13T12:35:06+10:00 |
valkey: Improve Redis client factories with health-checks and automatic reconnections
|
39a1fed31 |
Tim Richardson |
2025-09-13T12:34:51+10:00 |
Update deployment file to valkey_pods_deployment_v3_sentinel
|
a66b26b16 |
havizvaisal |
2025-09-11T23:15:17+07:00 |
Merge pull request #22 from GrowthPath/master-pricing-site-hq
Master pricing site hq
|
58ddce641 |
haviz |
2025-09-11T23:07:37+07:00 |
pricing site hq
|
f9d2e1f24 |
Tim Richardson |
2025-09-11T23:07:37+10:00 |
Add "Send Receipt Webhook" feature to dear_purchasing app
- Added a new POST action "Send Receipt Webhook" in dear_purchasing/dp_views.py to send selected warehouse receipt batches as a consolidated JSON payload to an external webhook endpoint.
- Implemented logging of webhook payloads and responses using JobMaster for audit and troubleshooting.
- Added a new submit button in dear_purchasing/templates/dear_purchasing/choose_batch_with_filter.html to trigger the webhook sending action.
- Created an OpenAPI spec docs/openapi/purchase_receipt_notification.yaml describing the webhook payload schema and endpoint.
- Added a PyCharm run configuration file .run/run_djcity.run.xml for running the Django project with specific environment variables.
App affected: dear_purchasing
|
c05deb5d2 |
Tim Richardson |
2025-09-11T16:54:11+10:00 |
Refactor Hexspoor-related Celery tasks into a new module `tasks_hexspoor.py` in the `three_pl_dermapen` app. - Moved Hexspoor tasks from `tasks.py` to `tasks_hexspoor.py` for better modularity and maintainability. - Updated imports in `tasks.py`, `views_dermapen.py`, and tests to use the new module. - Removed duplicate task definitions from `tasks.py`. - Added logging import and logger setup in `hexspoor_models.py`.
Apps affected: `three_pl_dermapen`
|
fe1b79762 |
Tim Richardson |
2025-09-11T15:03:13+10:00 |
Update three_pl_dermapen app: Revamp 3PL fulfilment status views and templates
- Refactor ResetFulfilmentRowStatusView to use FormView with proper form handling and permission checks.
- Add inline status update form to ThreePLRowStatus view with POST support and permission enforcement.
- Improve reset_status_confirmation.html to show a form for changing status instead of static confirmation.
- Enhance three_pl_row_status.html with better layout, Bootstrap styling, and inline status update form.
- Add _ResetProcessStatusForm for selecting new process status.
- Add detailed logging and user messages on status changes.
- Enforce permission checks on status updates.
- Clean up imports and remove redundant code.
|
d23c0afd1 |
Tim Richardson |
2025-09-11T08:18:44+10:00 |
Commit message:
revel_pos: Prevent duplicate PO creation from Dear restock transfers and fix PurchaseOrderAPI call
- In revel_pos/business_logic/restock_orders.py:
- Added persistent tracking of processed Dear stock transfers using KeyValueJson to avoid duplicate PO creation.
- Updated Dear Stock-Transfer "Reference" field with a sentinel string after successful PO submission to mark as exported.
- Added logging for duplicate skips and update failures.
- In revel_pos/revel_connector.py:
- Fixed PurchaseOrderAPI.api_request call to use named 'endpoint' parameter for clarity.
- In revel_pos/tasks.py:
- Commented out redundant old task_create_revel_POs_from_dear_restocks task code to reduce clutter.
- In revel_pos/tests/test_revel_po_logic.py:
- Removed unused import of task_create_revel_POs_from_dear_restocks.
These changes improve robustness by preventing duplicate PO submissions from the same Dear restock transfer and clean up legacy code.
|
f6512dedf |
haviz |
2025-09-10T12:11:02+07:00 |
update latest pricing code
|
67806acc8 |
haviz |
2025-07-31T11:06:51+07:00 |
add pricing site hq
|
ff76650a2 |
haviz |
2025-08-12T07:46:37+07:00 |
fix get price number
|
c9ef1361b |
haviz |
2025-07-31T11:06:51+07:00 |
add pricing site hq
|
b66b89928 |
Tim Richardson |
2025-09-10T15:28:37+10:00 |
Update ansible_setup.md: add AWS ECR secrets configuration guide
|
0af435fc6 |
Tim Richardson |
2025-09-10T11:21:38+10:00 |
Add tooltips and info icons to columns and filters in three_pl and three_pl_dermapen apps for better UX; improve error logging in three_pl_dermapen.tasks.
- three_pl: Add info icon tooltip to stock_cover_rating and process_status columns in ThreePL_order_fulfilmentsTable.
- three_pl_dermapen:
- Add tooltips to filter labels (warehouse_name, order_age) in ThreePLFulfilmentsFilter and persist order_age filter in session.
- Add tooltip to three_PL_fulfilment_id column in ThreePL_order_fulfilmentsTable_dermapen.
- Improve error message logging in task_send_queued_orders to use latest_result from DB if available.
- Remove commented-out RuntimeError raise in task_dermapen_autopick_by_channel.
- Add missing import of mark_safe in views_dermapen.py.
|
1744aecbd |
Tim Richardson |
2025-09-10T10:17:22+10:00 |
core, three_pl_dermapen: - core/models.py: Improved capturing and storing of Celery worker hostname in JobMaster and JobLog models, using full Celery hostname if available. - three_pl_dermapen/tasks.py: Added handling for Pydantic ValidationError in send_one_fulfilment_row task to log detailed validation errors, mark fulfilment as rejected, and notify via email.
|
bbb85d639 |
Tim Richardson |
2025-09-10T09:14:32+10:00 |
Commit message: three_pl_dermapen: Improve error logging in Hexspoor order send task
- Enhanced exception handling in send_one_fulfilment_row to log a clearer message.
- Use row.latest_result if available for error details, otherwise fallback to exception string.
- Updated log message to include error details and specify Hexspoor send failure.
|
bbd552491 |
Tim Richardson |
2025-09-10T09:00:02+10:00 |
Update core, three_pl, and three_pl_dermapen apps:
- core/tasks.py: Improve evict_stale_gevent_jobs to only target gevent queue tasks and revoke them on specific workers; update default age_hours to 3.
- three_pl/business_logic/fulfilment_rows.py: Change job log statuses from ERROR/COMPLETED to INFO when reporting completion with or without errors.
- three_pl_dermapen/tasks.py: Change various job log statuses from OK/COMPLETED to INFO or OK for consistency and clarity.
|
44bb271f7 |
Tim Richardson |
2025-09-10T00:17:26+10:00 |
commit: project - Disable server-side cursors for all Django DB connections to avoid PgBouncer issues
- Added 'OPTIONS': {'server_side_cursors': False} to default and dear_analytics database settings.
- Introduced global setting DISABLE_SERVER_SIDE_CURSORS = True to disable server-side cursors on all DB connections.
- This prevents errors caused by PgBouncer's transaction-pooling mode dropping session state.
|
3f5d0b538 |
Tim Richardson |
2025-09-10T00:16:12+10:00 |
Commit message:
```
dear_zoho_analytics, three_pl: Fix DB cursor handling and improve 3PL row filtering logic
- dear_zoho_analytics: Materialize ProductAvailability queryset to list before further DB writes to avoid psycopg2 InvalidCursorName errors due to server-side cursor closure.
- three_pl: Refine filtering in update_rows_pass_2 to include Netherlands rows with Cancelled status and pending 3PL process status; add trimming and case normalization for warehouse_name and latest_result checks.
```
|
2ec5dcefd |
Tim Richardson |
2025-09-10T00:03:54+10:00 |
Add final job completion log messages with job_score=100 and appropriate status to multiple tasks in the three_pl_dermapen app for clearer job lifecycle tracking; optimize fulfilment row archiving in three_pl by replacing per-row updates and logs with a single bulk update and summary log.
Apps: three_pl, three_pl_dermapen
|
b66095ee1 |
Tim Richardson |
2025-09-09T22:49:45+10:00 |
Update three_pl and three_pl_dermapen apps: - Refactor and improve logging and error handling in task_send_queued_orders and related 3PL tasks. - Add detailed logging of filtering criteria and reasons when no orders are processed in task_send_queued_orders. - Fix formatting, spacing, and minor code style issues across tasks.py and views.py files. - Add comments and clarify some log messages for better debugging and maintenance. - Minor fixes in views_dermapen.py for comment formatting.
|
c5d2a5cce |
Tim Richardson |
2025-09-09T22:33:43+10:00 |
Add archiving of old fulfilment rows in update_rows_pass_2 to mark rows older than 12 months as ARCHIVED and exclude them from processing; add special handling for "NETHERLANDS AVAILABLE" warehouse to void rows with latest_result "Cancelled"; fix mark_for_sweep flag reset. Apps: three_pl
|
c073f0093 |
Tim Richardson |
2025-09-09T21:03:46+10:00 |
Increase max_client_conn from 500 to 1000 in amazon_eks base config (amazon_eks)
|
fbf111e11 |
Tim Richardson |
2025-09-09T20:29:58+10:00 |
Add pgbouncer-auth Secret patch with variable substitution to all amazon_eks overlays
- Updated kustomization_pre_subst.yaml in multiple amazon_eks overlays (e.g., 1300tempfence, aurora-lites, ausab, bandr, barbell, cantontea, chefworks, cultiver, curve, djcity, equipmed, glenmar, graintec, interioricons, kelato, littlelinen, livingbydesign, loam, marle, onemile, prestige, prp, purefood, retrojan, satara, sprint, statusanxiety, thesaltyfox, tilecloud, vv, xysense)
- Added a patch to overwrite the stringData of the pgbouncer-auth Secret with userlist.txt entries using variables (e.g., ${short_hostname}, ${django_api_sync_db_password}, ${analytics_db_password}, ${omni_analytics_db_password}) that will be substituted by the deployment script
- Removed redundant empty default literals from tilecloud overlay's site-secret generator
App: amazon_eks
|
5a14e4914 |
Tim Richardson |
2025-09-09T20:29:29+10:00 |
Merge branch 'master' into pgbouncer
# Conflicts:
# ansible/includes/version.yml
# three_pl/tasks_djcity.py
# zoho_crm/zoho_crm_business_logic/dear_to_zoho_quote_sync.py
|
99d20a5a6 |
Tim Richardson |
2025-09-09T19:22:33+10:00 |
Update pgbouncer config in amazon_eks base: remove explanatory comments and adjust admin_users setting
App: amazon_eks
|
6ca37c3f8 |
Tim Richardson |
2025-09-09T16:26:42+10:00 |
Add direct PostgreSQL connection check in core/db_connection_diagnostics.py
- In core app, enhance database diagnostics by adding a direct connection test to the PostgreSQL server using psycopg2, bypassing PgBouncer.
- This extra check uses the same credentials as Django and respects any POSTGRES_HOST/PORT environment overrides.
- Minor comment fix in amazon_eks/helpers/configure_new_version.sh (typo in comment).
|
b73704cf3 |
Tim Richardson |
2025-09-09T14:27:41+10:00 |
Add PyCharm run configuration for `run_test-dear` environment
|
a9a2d7720 |
Tim Richardson |
2025-09-09T14:02:56+10:00 |
Update test-dear site-secret.yaml with new password and corresponding MD5 hash entries
|
3ac25dda2 |
Tim Richardson |
2025-09-09T13:32:13+10:00 |
Update secret hashes in amazon_eks overlay for test-dear environment
|
522352510 |
Tim Richardson |
2025-09-09T13:20:59+10:00 |
Commit message:
Update Zoho 3PL stock analysis progress logging and fix quote sync test formatting
- three_pl_dermapen: Added detailed job progress logging with job_score updates during Zoho 3PL stock analysis refresh, including start, row processing progress, upload completion, and final completion status.
- zoho_crm: Fixed string literal formatting in dear_to_zoho_quote_sync test to correctly escape backslash.
- amazon_eks: Updated test-dear site-secret.yaml to add md5 hash entries for passwords.
Apps affected: three_pl_dermapen, zoho_crm, amazon_eks
|
05d36cad1 |
Tim Richardson |
2025-09-09T13:00:38+10:00 |
move dj city SSI tasks back to process pool
|
8953c844c |
Tim Richardson |
2025-09-09T12:33:43+10:00 |
Merge branch 'master' into pgbouncer
# Conflicts:
# ansible/includes/version.yml
|
d496288fc |
Tim Richardson |
2025-09-09T12:33:24+10:00 |
Add PyCharm run configuration for equipmed environment; add 1-second delay before retrying chunk upload in dear_zoho_analytics app (zoho_backend).
|
8192c10be |
Tim Richardson |
2025-09-09T10:51:26+10:00 |
Commit message: core: enhance job_log_delete task to accept job_id parameter for better job tracking
|
e88e4285f |
Tim Richardson |
2025-09-09T10:26:55+10:00 |
Update three_pl_dermapen to log completion message with 100% job score in Zoho stock analysis refresh function
|
6302912f0 |
Tim Richardson |
2025-09-08T21:36:22+10:00 |
Commit message:
core, three_pl: Add acks_late=False to Celery tasks and improve logging
- core: Added acks_late=False to several Celery tasks to acknowledge tasks before running, improving task handling and reliability.
- core: Added @no_simultaneous_execution_no_retry decorator to job_log_delete and other tasks to prevent concurrent execution.
- three_pl: Added acks_late=False to Celery tasks in tasks_djcity.py and improved job logging messages for better traceability.
|
d6512767e |
Tim Richardson |
2025-09-08T21:15:56+10:00 |
Commit message:
core: Add publish_to_websocket=False to job.log_message in task decorators and task_cleanup_stale_locks; improve webhook task processing locking
- Suppress websocket publishing for certain job.log_message calls in no_simultaneous_execution_no_retry decorator and task_cleanup_stale_locks task to reduce noise.
- In process_due_webhook_tasks, mark selected webhook tasks as PROCESSING and update next_attempt_time to prevent duplicate processing.
- Add @no_simultaneous_execution_no_retry decorator to task_cleanup_stale_locks to prevent concurrent execution.
|
9d9a8ee7c |
Tim Richardson |
2025-09-08T20:26:14+10:00 |
Update core, three_pl_dermapen, and project apps: - core: Improve is_gevent_monkey_patched() detection with multiple heuristics and env var override; add detailed logging. - project: Make celery_task_tracking import opt-in via ENABLE_CELERY_TASK_TRACKING env var. - three_pl_dermapen: Rename process_fulfilment_hoxton to prepare_fulfilment_hoxton; simplify HoxtonManager order sending logic; update task mapping to use new function. - docker-compose.yml: Comment out healthchecks and depends_on conditions; set CELERY_TASK_ALWAYS_EAGER=true for local dev. - .idea: Update Python SDK version and fix VCS directory mapping.
|
c08fcb917 |
Tim Richardson |
2025-09-08T18:48:40+10:00 |
Remove outdated .idea configuration files and update excluded venv folder in project settings
|
5bc9f3fbc |
Tim Richardson |
2025-09-08T17:04:11+10:00 |
Commit message: amazon_eks: Remove extraneous 'depl' line from tilecloud site-secret.yaml
|
df63c96db |
Tim Richardson |
2025-09-08T16:26:23+10:00 |
Merge branch 'master' into pgbouncer
# Conflicts:
# ansible/includes/version.yml
|
254830886 |
Tim Richardson |
2025-09-08T16:25:50+10:00 |
Add a global Redis lock to prevent concurrent execution of the intercompany journal sync pipeline across multiple pods/workers in cached_dear/tasks_tilecloud.py. This ensures only one instance runs cluster-wide, avoiding duplicate processing.
App: cached_dear
|