Skip to content

Instantly share code, notes, and snippets.

@reindert-vetter
Last active December 6, 2023 10:11
Show Gist options
  • Save reindert-vetter/a7d1c57e5055c4e3649b107407c44f9e to your computer and use it in GitHub Desktop.
Save reindert-vetter/a7d1c57e5055c4e3649b107407c44f9e to your computer and use it in GitHub Desktop.
stats import
  1. ssh job-03 (for prod)
  2. screen (for prod)
  3. cd /var/www/vhosts/default_production/current && php artisan horizon:pause-supervisor supervisor-tmp-stats-normal && rm storage/logs/laravel.log && touch storage/logs/laravel.log && php artisan migrate:rollback-and-migrate-specific --path modules/Statistics/Database/Migrations/2022_05_13_106623_clickhouse_create_view_subscriptions_updated.php,modules/Statistics/Database/Migrations/2022_05_13_106626_clickhouse_create_view_subscription_mutations.php --down=true --up=true && php artisan maintenance:fill-stats --model=installments_contracts && php artisan horizon:continue-supervisor supervisor-tmp-stats-normal
  1. ssh job-03 (for prod)
  2. screen (for prod)
  3. cd /var/www/vhosts/default_production/current && php artisan horizon:pause-supervisor supervisor-tmp-stats-normal && rm storage/logs/laravel.log && touch storage/logs/laravel.log && php artisan maintenance:fill-stats --writer=tsv && php artisan horizon:continue-supervisor supervisor-tmp-stats-normal
  1. supervisor-tmp-stats-normal uitzetten. In code; anders gaat het bij een nieuwe release weer aan: https://github.com/plug-and-pay/plug-and-pay/pull/2239/files
  2. ssh job-03 (for prod)
  3. screen (for prod)
  4. cd /var/www/vhosts/default_production/current && php artisan horizon:pause-supervisor supervisor-tmp-stats-normal && rm storage/logs/laravel.log && touch storage/logs/laravel.log && php artisan maintenance:fill-stats --model=installments_contracts && php artisan horizon:continue-supervisor supervisor-tmp-stats-normal

&& php artisan migrate:rollback-and-migrate-specific --path modules/Statistics/Database/Migrations/2022_05_13_106621_clickhouse_create_table_order_items.php,modules/Statistics/Database/Migrations/2022_05_13_106621_clickhouse_create_table_orders.php,modules/Statistics/Database/Migrations/2022_05_13_106621_clickhouse_create_table_subscriptions.php,modules/Statistics/Database/Migrations/2022_05_13_106622_clickhouse_create_table_activities.php,modules/Statistics/Database/Migrations/2022_05_13_106622_clickhouse_create_table_products.php,modules/Statistics/Database/Migrations/2022_05_13_106623_clickhouse_create_view_subscriptions_updated.php,modules/Statistics/Database/Migrations/2022_05_13_106624_clickhouse_create_view_updated_orders.php,modules/Statistics/Database/Migrations/2022_05_13_106625_clickhouse_create_view_updated_order_items.php,modules/Statistics/Database/Migrations/2022_05_13_106626_clickhouse_create_view_subscription_mutations.php --down=true --up=true x: supervisor-tmp-stats-normal aanzetten: https://github.com/plug-and-pay/plug-and-pay/pull/2239/files

in de nacht hoeft verwachten we geen releases: && php artisan horizon:pause-supervisor supervisor-tmp-stats-normal 6. php artisan horizon:continue-supervisor supervisor-tmp-stats-normal

@reindert-vetter
Copy link
Author

tail -f storage/logs/laravel.log | grep Mem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment