Fix main import script issue

This commit is contained in:
2025-02-16 11:54:28 -05:00
parent 9b8577f258
commit 702b956ff1
2 changed files with 13 additions and 13 deletions

View File

@@ -10,10 +10,10 @@ const importPurchaseOrders = require('./import/purchase-orders');
dotenv.config({ path: path.join(__dirname, "../.env") }); dotenv.config({ path: path.join(__dirname, "../.env") });
// Constants to control which imports run // Constants to control which imports run
const IMPORT_CATEGORIES = true; const IMPORT_CATEGORIES = false;
const IMPORT_PRODUCTS = true; const IMPORT_PRODUCTS = false;
const IMPORT_ORDERS = true; const IMPORT_ORDERS = true;
const IMPORT_PURCHASE_ORDERS = true; const IMPORT_PURCHASE_ORDERS = false;
// Add flag for incremental updates // Add flag for incremental updates
const INCREMENTAL_UPDATE = process.env.INCREMENTAL_UPDATE !== 'false'; // Default to true unless explicitly set to false const INCREMENTAL_UPDATE = process.env.INCREMENTAL_UPDATE !== 'false'; // Default to true unless explicitly set to false
@@ -202,14 +202,14 @@ async function main() {
records_updated = $3, records_updated = $3,
status = 'completed', status = 'completed',
additional_info = jsonb_build_object( additional_info = jsonb_build_object(
'categories_enabled', $4, 'categories_enabled', $4::boolean,
'products_enabled', $5, 'products_enabled', $5::boolean,
'orders_enabled', $6, 'orders_enabled', $6::boolean,
'purchase_orders_enabled', $7, 'purchase_orders_enabled', $7::boolean,
'categories_result', $8::jsonb, 'categories_result', COALESCE($8::jsonb, 'null'::jsonb),
'products_result', $9::jsonb, 'products_result', COALESCE($9::jsonb, 'null'::jsonb),
'orders_result', $10::jsonb, 'orders_result', COALESCE($10::jsonb, 'null'::jsonb),
'purchase_orders_result', $11::jsonb 'purchase_orders_result', COALESCE($11::jsonb, 'null'::jsonb)
) )
WHERE id = $12 WHERE id = $12
`, [ `, [

View File

@@ -1,5 +1,5 @@
#!/bin/zsh #!/bin/zsh
#Clear previous mount in case it's still there #Clear previous mount in case it's still there
umount "/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server" umount '/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server'
#Mount #Mount
sshfs matt@dashboard.kent.pw:/var/www/html/inventory -p 22122 "/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server/" sshfs matt@dashboard.kent.pw:/var/www/html/inventory -p 22122 '/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server/'