(payload, options)
| 718 | } |
| 719 | |
| 720 | function tryWriteStatusSnapshots(payload, options) { |
| 721 | if (!options.writeDir) { |
| 722 | return null; |
| 723 | } |
| 724 | |
| 725 | try { |
| 726 | return writeStatusSnapshots(payload, options.writeDir); |
| 727 | } catch (error) { |
| 728 | console.error(`[loop-status] WARNING: could not write status snapshots: ${error.message}`); |
| 729 | return null; |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | function sleep(ms) { |
| 734 | return new Promise(resolve => setTimeout(resolve, ms)); |
no test coverage detected