channel-worker 2.5.74 → 2.5.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/upload_facebook.js +17 -19
package/package.json
CHANGED
|
@@ -1686,7 +1686,6 @@ async function runOnce({ page, payload, log }) {
|
|
|
1686
1686
|
const closeDeadline = Date.now() + 60_000;
|
|
1687
1687
|
let modalClosed = false;
|
|
1688
1688
|
let closedPolls = 0;
|
|
1689
|
-
let appliedPolls = 0;
|
|
1690
1689
|
let retryCount = 0;
|
|
1691
1690
|
const RETRY_AFTER_MS = 12_000;
|
|
1692
1691
|
let lastRetryAt = Date.now();
|
|
@@ -1696,23 +1695,21 @@ async function runOnce({ page, payload, log }) {
|
|
|
1696
1695
|
// nested form (no own dialog — its upload button, aria
|
|
1697
1696
|
// "Tải hình thu nhỏ tùy chỉnh lên…", only exists while the
|
|
1698
1697
|
// editor is showing).
|
|
1699
|
-
//
|
|
1700
|
-
//
|
|
1701
|
-
//
|
|
1702
|
-
//
|
|
1703
|
-
//
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
appliedPolls = 0;
|
|
1715
|
-
}
|
|
1698
|
+
// ĐÃ GỠ (2.5.75) — lối tắt "thấy nút Gỡ 2 nhịp thì coi như xong,
|
|
1699
|
+
// bấm Lưu chốt một cái rồi đi tiếp". Đo trên 20.000 dòng log
|
|
1700
|
+
// ngày 04/09/2026: lối tắt chạy 21 lượt thì 19 lượt kết thúc
|
|
1701
|
+
// bằng dump "composer closed after saving thumbnail", trong khi
|
|
1702
|
+
// đường thường (chờ editor đóng hẳn) chạy 98 lượt đăng ngon.
|
|
1703
|
+
// Chuỗi log lặp đúng một khuôn: NORMAL→PUBLISH, FAST→DUMP DUMP.
|
|
1704
|
+
//
|
|
1705
|
+
// Nút "Gỡ" hiện NGAY khi file vừa dán, lúc ảnh còn đang xử lý
|
|
1706
|
+
// (ảnh dump nào cũng thấy spinner), nên lối tắt cướp lượt của
|
|
1707
|
+
// những lần lẽ ra đóng bình thường sau 3-5s, rồi bấm Lưu lần
|
|
1708
|
+
// hai khi FB đang lưu dở — composer bị gỡ khỏi trang.
|
|
1709
|
+
//
|
|
1710
|
+
// Cohort inline thật (panel không bao giờ đóng) vẫn còn hai lớp
|
|
1711
|
+
// cứu phía dưới: nhánh hết-giờ-60s và cổng trước Đăng, cả hai
|
|
1712
|
+
// đều KHÔNG bấm thêm Lưu. Đó mới là đường đã nghiệm thu 03/09.
|
|
1716
1713
|
const still = await isThumbnailEditorVisible(page);
|
|
1717
1714
|
if (!still) {
|
|
1718
1715
|
// Require two consecutive closed samples. Facebook briefly
|
|
@@ -1726,7 +1723,8 @@ async function runOnce({ page, payload, log }) {
|
|
|
1726
1723
|
// Retry Lưu click after RETRY_AFTER_MS without progress —
|
|
1727
1724
|
// limit to 3 retries (so we still leave time for FB to
|
|
1728
1725
|
// finish processing on the last attempt).
|
|
1729
|
-
if (retryCount < 3 && Date.now() - lastRetryAt >= RETRY_AFTER_MS
|
|
1726
|
+
if (retryCount < 3 && Date.now() - lastRetryAt >= RETRY_AFTER_MS
|
|
1727
|
+
&& !(await isCustomThumbApplied(page))) {
|
|
1730
1728
|
retryCount++;
|
|
1731
1729
|
lastRetryAt = Date.now();
|
|
1732
1730
|
log('info', `[fb-pw] thumb modal still open after ${retryCount * (RETRY_AFTER_MS / 1000)}s — re-clicking Lưu (retry ${retryCount}/3)`);
|