diff --git a/.github/workflows/deploy_api.yml b/.github/workflows/deploy_api.yml index 3e2e3c59..9df543c0 100644 --- a/.github/workflows/deploy_api.yml +++ b/.github/workflows/deploy_api.yml @@ -49,7 +49,7 @@ jobs: echo "Starting redis service..." sudo systemctl start redis echo "Starting gunicorn..." - nohup sh -c 'gunicorn -w 4 marketplace.wsgi:application > gunicorn.out 2>&1' & + nohup sh -c 'gunicorn -w 4 --access-logfile - --error-logfile - --timeout 300 marketplace.wsgi:application > gunicorn.out 2>&1' & echo "Gunicorn started." echo "Starting celery worker..." nohup sh -c 'celery -A marketplace worker -l info > celery_worker.out 2>&1' & diff --git a/.github/workflows/deploy_prod_api.yml b/.github/workflows/deploy_prod_api.yml index edbdf38b..e5b4bf3c 100644 --- a/.github/workflows/deploy_prod_api.yml +++ b/.github/workflows/deploy_prod_api.yml @@ -51,7 +51,7 @@ jobs: echo "Starting redis service..." sudo systemctl start redis echo "Starting gunicorn..." - nohup sh -c 'gunicorn -w 4 marketplace.wsgi:application > gunicorn.out 2>&1' & + nohup sh -c 'gunicorn -w 4 --access-logfile - --error-logfile - --timeout 300 marketplace.wsgi:application > gunicorn.out 2>&1' & echo "Gunicorn started." echo "Starting celery worker..." nohup sh -c 'celery -A marketplace worker -l info > celery_worker.out 2>&1' & diff --git a/.github/workflows/deploy_ui.yml b/.github/workflows/deploy_ui.yml index b3f86279..c6146860 100644 --- a/.github/workflows/deploy_ui.yml +++ b/.github/workflows/deploy_ui.yml @@ -42,7 +42,7 @@ jobs: npm install npm run build sudo systemctl restart nginx - pm2 stop marketplace + pm2 delete marketplace pm2 start npm --name marketplace -- start - name: Remove Github Actions IP from security group diff --git a/src/ui/app/influencer/dashboard/page.tsx b/src/ui/app/influencer/dashboard/page.tsx index d30a6265..26efdb8e 100644 --- a/src/ui/app/influencer/dashboard/page.tsx +++ b/src/ui/app/influencer/dashboard/page.tsx @@ -1088,6 +1088,7 @@ export default function BusinessDashboardPage() { {params?.row?.approved && (params?.row?.status === ORDER_ITEM_STATUS.ACCEPTED || params?.row?.status === ORDER_ITEM_STATUS.CANCELLED) && + params?.row?.order_id?.status === ORDER_STATUS.ACCEPTED && // Publish date is in the future dayjs(params?.row?.publish_date) > dayjs() && ( diff --git a/src/ui/app/influencer/profile/[id]/_services/index.tsx b/src/ui/app/influencer/profile/[id]/_services/index.tsx index 84c11186..8ca824e0 100644 --- a/src/ui/app/influencer/profile/[id]/_services/index.tsx +++ b/src/ui/app/influencer/profile/[id]/_services/index.tsx @@ -37,7 +37,7 @@ const Services = ({ const dispatch = useAppDispatch(); const cart = useAppSelector((state) => state.cart); const loggedInUser = useAppSelector((state) => state.user?.user); - const [type, setType] = React.useState(null); + const [type, setType] = React.useState("published"); const [services, setServices] = React.useState([]); const [pagination, setPagination] = React.useState({ total_data_count: 0, @@ -58,16 +58,13 @@ const Services = ({ const getServices = async () => { try { setLoading(true); - const { message, data, isSuccess, errors } = await getService( + const { message, data, isSuccess } = await getService( "packages/service", { page_number: pagination.current_page_number, - page_size: - id === loggedInUser?.id - ? pagination.current_page_size - : pagination.current_page_size + 1, + page_size: pagination.current_page_size, influencer: id, - status: id === loggedInUser?.id ? type : "published", + status: type, } ); if (isSuccess) { @@ -120,6 +117,12 @@ const Services = ({ } }, [refreshPage]); + useEffect(() => { + if (id && loggedInUser && loggedInUser?.id && loggedInUser?.id === id) { + setType(null); + } + }, [loggedInUser, id]); + useEffect(() => { getServices(); }, [pagination.current_page_number, pagination.current_page_size, type]);